713 Posted Topics
Re: 2 things: March 1st to April 30th is a 2 month period, if that's the UK financial year what happens to the rest 10 months? I'm guessing this is a typo, as your code proves. second thing is why not just set dateformat and set the date as a string? … | |
Re: @BitBlt: Although I don't disagree with a thing you've said, it's easy enough to figure the keys and their owners by concatenating with the key a hardcoded value that would show it's origin. ie : [CODE]select id,PCNAME as PC from tblPropertyCategory union select 'S' + convert(varchar(10),id), PSCNAME from tblPropertySubCategory [/CODE] … | |
Re: Wouldn't closing the files that your macros use properly be the correct course of action here? Anyway, I think the command you are looking for is: [CODE]application.AutoRecover.Enabled = False[/CODE] | |
Re: If you were grouping by [iCODE]month(inv_date)[/iCODE] then I'd suggest outer joining your query to a query resulting in numbers from 0 to 11. Since you are grouping by 1st of each month, without a certain period defined, I'm guessing that you can datediff number of months and outer join to … | |
Re: A description of what the "query" is supposed to do would also be nice. | |
Re: Have you added * before and after the string you want to show as barcode? ie. If you want to print a barcode saying test then you should format with that font the string *test* | |
Re: @BitBlt: That's one sick query, which like all your queries will work. Wouldn't it be easier and less time consuming to just: [CODE] select substring(REPLACE( ' ' + myString + ' ' , ' NORTH ',' N '),2,len(myString)) from #temp [/CODE] | |
Re: I don't understand either what you are asking, or why you are asking what I think you are. It is not possible to retrieve records from a table with 2 separate sorts. Then you are not retrieving records, but 2 separate lists - which have nothing to do with each … | |
Re: Let me start by saying that you have ressurected a 3 year old topic. You should have read the warning and let it be. Especially when you don't really know what you are talking about. The plus symbol (+) has 2 functions: a) to add when used with numbers b) … | |
Re: I know I'm not much of help, but I just have to ask: How did you manage to figure out structures, string concatenation, special characters (vbTab & vbCrLf) and not know how to clear a textbox or can't figure out that you are clearing whatever existed in textboxbill by not … | |
Re: You could use the QUOTENAME function (Read about it here: [url]http://msdn.microsoft.com/en-us/library/ms176114.aspx[/url] ) for strings up to 128 characters. | |
Re: As a general rule, SQL is build to handle group of records (matching criteria) simultaneously. Your description looks like you are thinking linear processing, which will not work that well with SQL and it will definately not allow you to use your server 100%. Anyway, you'll need to provide more … | |
Re: @Reverend Jim: I'd also divide by 1000, round and then multiply by 1000, but I don't get why you are adding 500. Please explain. | |
Re: This article might give you a starting point: [url]http://www.daniweb.com/web-development/databases/ms-sql/threads/380157[/url] | |
Re: According to this forum: [url]http://www.vbforums.com/showthread.php?t=528826[/url] the answer is (and I quote) : [CODE]Application.DisplayAlerts = False ActiveWorkbook.SaveAs (etc.) Application.DisplayAlerts = True[/CODE] | |
Re: Did you declare numberOne and numberTwo as strings? PS: What happens when the string contains 2 or more operators? | |
Re: I think it's wrong to work everything together without a clear plan and a timetable. Usually this means that you'll be going back and forth. I'd suggest you invest on some planning and then setting a target date. Find a gantt chart (in excel will do, you don't need MS … | |
Re: Read the first line (verify type 002 or length) and get A into a var. Read the next lines, incrementing a counter, until you get to a line with type 002 or length of header line (don't increment your counter for this line). compare your counter to the A value … | |
Re: You'll need to provide the code that runs with the save button, as you are describing the problem to appear on save. If Cb2 get's populated OK, then probably the code you are posting is irrelevant to your problem. | |
Re: If you have values that don't contain T then you are adding one to the count by returning to the count the number 0. You can try to remove else entirely or replace 0 with NULL. I'm guessing both will work. | |
Re: If you've got the last activity date (or what you want to use as criteria) you can create an update query to disable your users and set a job in SQL Agent to run in set intervals (from every second up to once a month or on set dates) and … | |
Re: I'm going to give you the logic of what you should do and if you try it and fail I'll help you as needed: Degrees would be the integer part of textbox4. Multiply the decimals of textbox4 times 60 and the integer part of the result is the minutes and … | |
Re: Great solution, as always. You could make it a bit better by skipping the temp table and sticking the whole insert into a view. An indexed one for best performance, provided schemabinding is OK. | |
Re: I can only think of cursor for this one. It might not be the best way, but you don't want a join or acartesian product. Read here for cursors: [url]http://msdn.microsoft.com/en-us/library/ms180169.aspx[/url] | |
Re: What do you mean you run this with a breakpoint? Are you inserting,deleting,updating,altering the trigger? | |
Re: I'm not sure if this is the solution you are looking for, but PDFCreator (which is free) has a feature to save PDFs that get send to it's virtual printer to a specific location. On it's site ([url]http://sourceforge.net/projects/pdfcreator/[/url] )it says under features: [QUOTE]AutoSave files to folders and filenames based on … | |
Re: This should do the trick: [CODE]select a.LastName + ', ' + a.Firstname as theTrainee, b.LastName + ', ' + b.Firstname as PersonInCharge from Records r inner join UsersList a on r.TheUser = a.Username inner join UsersList b on r.ApprovedBy = b.Username[/CODE] I haven't tested it, so it might contain typos. | |
Re: It will be much easier for you to debug things like this by adding [CODE]Debug.Print selectSQL [/CODE] after you've set selectSQL or what you call your var. While executing you'll get the actual query sent to SQL in the immediate pane. Copy/Pasting this to the db will always show if … | |
Re: Read here about pivot in SQL: [url]http://msdn.microsoft.com/en-us/library/ms177410.aspx[/url] | |
Re: We rarelly want to increment on form open or in any event other than the actual insert. The reason for this is that you are probably going to get either multiple records with the same id (if not set as unique in a multiuser environment) or one of your users … | |
Re: You've just declared the dataset and you are trying to insert a row to a non-existing table. | |
Re: The problem isn't the conversion from old syntax to join syntax, but that you are missing a group by. Also I don't think that you can get a running total with a.ID = B.ID I think you need to a.ID >= b.ID (in order to sum all records up to … | |
Re: I think we need to know what you are trying (inside the try...catch block). Also would be nice to know how you are connecting to SQL. | |
Re: You can't use INSERT like this, not even if you use a view. MSDN says: [QUOTE] table_or view_name Is the name of the table or view that is to receive the data. A table variable, within its scope, can be used as a table source in an INSERT statement. The … | |
Re: [QUOTE=trisha0906;1738300]i want to get the surname, first name and middle name from the student_info table and the Payment_Status from the accounting_system. [/QUOTE] The above can be achieved with this query: [ICODE]select Surname, First_Name, Middle_Name, Payment_Status from t_student_info a inner join t_accounting_system b on a.Surname = b.Surname and a.First_Name = b.First_Name … | |
Re: You can't display the header using RowIndex. I think RowIndex is negative when you double click the header. Test it and if it is use this as a check to determine that the event comes from the header. If it does exit sub without showing the next form as you … | |
Re: The openfiledialog can return a filename, but doesn't have to as you've figured out by cancelling the dialog. The way you've coded this you expect always to get a filename out of openfiledialog. If you check here: [url]http://msdn.microsoft.com/en-us/library/system.windows.forms.openfiledialog.aspx[/url] you'll find an example in the bottom of the page using [CODE]If … | |
Re: There are a number of ways to do this, but we can't tell what "any other" would be before letting us know which is the one you are using. If the data in the 2 tables share keys and make sense to join them you can join the tables and … | |
Re: Am I right to assume that by Product Registration Code you mean a code that the user will have to enter in order to verify that he is a legitimate user with a purchased copy? Building something like this in .Net is useless. Anybody with basic programming knowledge can "decompile" … | |
Re: How are you executing this query (passing vars and all)? I'd suggest using IN instead of OR. You'll have to provide a list of values like 'value1','value2','value3'. Depending on the way you pass parameters and execute your query you could pass this as 1 string: [CODE] and suburb in (@subs_list)[/CODE] … | |
Re: Read here how to cross threads: [url]http://msdn.microsoft.com/en-us/library/ms171728.aspx[/url] | |
Re: The counter part is easy, declare a var and after the [iCODE]cmd.ExecuteScalar[/iCODE] increment your var by 1 (record processed). | |
Re: You try to alter the table and set identity to seed from a higher number - I haven't tried it but I'm betting it will work. The easiest and most robust way to do it, IMO, is to create a function that will seed for you. It can be something … | |
Re: I'm sorry to break this to you, but I'm not sure that excel is free. You may have landed on the download page, but it says "Thank you for purchasing" so I searched their site and found this page: [url]http://www.ecommercesiteowners.com/car-make-model-year-databases[/url] You might want to verify that this file is something … | |
Re: You don't need a referential integrity in order to define the price. You would need a join. Referential integrity ensures that when you are inserting a record in wiring table for example there is a matching record in PriceList and/or that when you delete a record from PriceList all records … | |
![]() | Re: Can you post your form's code? It will make things easier both for us and you ![]() |
Re: You are missing a doublequote here: [CODE]job_code = ' & txtjob.text [/CODE] it should be [CODE]job_code = '" & txtjob.text [/CODE] | |
Re: I totally agree with hericles. It's bad practise to create a table per user. Add a username field and use that to relate to the users table. This way you'll be able to join way easier, have way less tables to manage (ie what happens if in a year from … | |
Re: Place the code you use to load the listbox in a sub by itself and call it after inserting a product in the db |
The End.