im tryin to create an if statement that reads
if the date inserted into txtdate.text doesnt lie between 01/01/2005 and todays date then please enter one in these boundaries.
Any ideas my statement isnt workin propely i dont get errors when it should do!
User Profile
Collapse
-
if statement date comparison in vb6
-
no worries guys iv sorted that prob u have to put <= not =< thnx alot guys im very thankful for your help :) -
cheers guys! pure genius! that or stupidity on my part :P the exit sub was the problem nice one mate much appreciated! any ideas how to do is less than or equal to tho? doesnt seem to be excepting =< in there :SLeave a comment:
-
Ok in reference to my code above in the where clause i want to compare a field with another to display only the records where the quantity of the stock field is less than the re order field.
iv removed the ; after the FROM section but stil when the command button is pressed nothin happens!
any suggestions?Leave a comment:
-
Sql Variable In Vb6
guys any ideas on comparing these varialbe strings in vb6?
...Code:Private Sub Command1_Click() Exit Sub Adodc1.RecordSource = "SELECT Stock.[Product Code], Stock.Description, Stock.[Quantity in Stock], Stock.[Re Order Level] FROM Stock; WHERE Stock.[Quantity in Stock]) < Stock.[Re Order Level];" Adodc1.Recordset.Requery Adodc1.Refresh DataGrid1.Refresh End Sub
-
guys im stil struggling on this one i feel its somethin to do with quotation marks!! took me ages to find out how to use them in a text field! any suggestions?Leave a comment:
-
cheers, but it still aint doin nothing! datagrid doesnt show the output from the query. :(Leave a comment:
-
sql syntax comparing fields
hey im new to this site but found it has helped me in the past with other similar problems. i want to be able to compare 2 fields in my sql my code is as follows:
...Code:Private Sub Command1_Click() Exit Sub Adodc1.RecordSource = "SELECT Stock.[Product Code], Stock.Description, Stock.[Quantity in Stock], Stock.[Re Order Level] FROM Stock; [B]WHERE Stock.[Quantity in Stock]) < Stock.[Re Order Level];&q[/]
No activity results to display
Show More
Leave a comment: