713 Posted Topics

Member Avatar for Conficker111111

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? …

Member Avatar for Conficker111111
0
1K
Member Avatar for geniusvishal

@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] …

Member Avatar for BitBlt
0
341
Member Avatar for darkelflemurian

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]

Member Avatar for darkelflemurian
0
243
Member Avatar for bilal_fazlani

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 …

Member Avatar for bilal_fazlani
0
510
Member Avatar for uva1102

A description of what the "query" is supposed to do would also be nice.

Member Avatar for thines01
0
164
Member Avatar for kosay
Member Avatar for easygi

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*

Member Avatar for easygi
0
191
Member Avatar for moone009

@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]

Member Avatar for adam_k
0
232
Member Avatar for rhone0809

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 …

Member Avatar for rhone0809
0
130
Member Avatar for cVz

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) …

Member Avatar for Todster
0
212
Member Avatar for Alex_2011

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 …

Member Avatar for Alex_2011
0
370
Member Avatar for fawadkhalil

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.

Member Avatar for adam_k
0
145
Member Avatar for smeboyds

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 …

Member Avatar for Cruize_Invades
0
103
Member Avatar for vammy

@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.

Member Avatar for Reverend Jim
0
443
Member Avatar for jovillanuev

This article might give you a starting point: [url]http://www.daniweb.com/web-development/databases/ms-sql/threads/380157[/url]

Member Avatar for adam_k
0
92
Member Avatar for thedonedeal

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]

Member Avatar for adam_k
0
172
Member Avatar for slbreaul

Did you declare numberOne and numberTwo as strings? PS: What happens when the string contains 2 or more operators?

Member Avatar for Reverend Jim
0
148
Member Avatar for warlord902

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 …

Member Avatar for peter_budo
0
236
Member Avatar for renzlo

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 …

Member Avatar for renzlo
0
315
Member Avatar for groff

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.

Member Avatar for groff
0
174
Member Avatar for jcarbillon

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.

Member Avatar for BitBlt
0
160
Member Avatar for arsheena.alam

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 …

Member Avatar for adam_k
0
112
Member Avatar for Trle94

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 …

Member Avatar for adam_k
0
163
Member Avatar for edpfister

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.

Member Avatar for BitBlt
0
1K
Member Avatar for gennesis

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]

Member Avatar for gennesis
0
367
Member Avatar for kindofsudden

What do you mean you run this with a breakpoint? Are you inserting,deleting,updating,altering the trigger?

Member Avatar for adam_k
0
217
Member Avatar for roottybrian

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 …

Member Avatar for Reverend Jim
0
371
Member Avatar for michaelzip

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.

Member Avatar for michaelzip
0
231
Member Avatar for moone009

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 …

Member Avatar for adam_k
0
107
Member Avatar for visweswaran28

Read here about pivot in SQL: [url]http://msdn.microsoft.com/en-us/library/ms177410.aspx[/url]

Member Avatar for BitBlt
0
187
Member Avatar for trisha0906

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 …

Member Avatar for trisha0906
1
2K
Member Avatar for vivekanandaan

You've just declared the dataset and you are trying to insert a row to a non-existing table.

Member Avatar for thines01
0
248
Member Avatar for chasadjee

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 …

Member Avatar for chasadjee
0
536
Member Avatar for SyncMaster170

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.

Member Avatar for SyncMaster170
0
177
Member Avatar for rhone0809

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 …

Member Avatar for M.Waqas Aslam
0
151
Member Avatar for trisha0906

[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 …

Member Avatar for ChrisPadgham
0
146
Member Avatar for shann1718

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 …

Member Avatar for ChrisPadgham
0
686
Member Avatar for Aphrite

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 …

Member Avatar for Jx_Man
0
216
Member Avatar for aishapot

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 …

Member Avatar for adam_k
0
179
Member Avatar for Teleka

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" …

Member Avatar for adam_k
0
218
Member Avatar for abathurst

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] …

Member Avatar for adam_k
0
132
Member Avatar for Mike Bishop

Read here how to cross threads: [url]http://msdn.microsoft.com/en-us/library/ms171728.aspx[/url]

Member Avatar for adam_k
0
214
Member Avatar for Mike Bishop

The counter part is easy, declare a var and after the [iCODE]cmd.ExecuteScalar[/iCODE] increment your var by 1 (record processed).

Member Avatar for Mike Bishop
0
230
Member Avatar for aishapot

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 …

Member Avatar for Reverend Jim
0
199
Member Avatar for teedoff

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 …

Member Avatar for rch1231
0
2K
Member Avatar for kyklops

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 …

Member Avatar for ChrisPadgham
0
214
Member Avatar for SeniorAlexandro
Member Avatar for SeniorAlexandro
0
131
Member Avatar for vivekanandaan

You are missing a doublequote here: [CODE]job_code = ' & txtjob.text [/CODE] it should be [CODE]job_code = '" & txtjob.text [/CODE]

Member Avatar for vivekanandaan
0
145
Member Avatar for teambiohazard

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 …

Member Avatar for adam_k
0
149
Member Avatar for Hawk123

Place the code you use to load the listbox in a sub by itself and call it after inserting a product in the db

Member Avatar for Hawk123
0
129

The End.