|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Syntax error in date in query expression
Syntax error in date in query expression '[Director's meeting day] = #3#
can any one please explain this error. thank you |
|
#2
|
|||
|
|||
|
Rishy,
The # is used to tell Access you are using a date/time variable. What is the 3 in your syntax suppose to be. lwells |
|
#3
|
|||
|
|||
|
Iwells,
I have not typed the #3#. It is the part of the error message and sometime it is displayed as #1#(in the error message) Please advise Quote:
|
|
#4
|
|||
|
|||
|
Hi Rishy,
Can you post the sql of your query and let me look at it. lwells |
|
#5
|
|||
|
|||
|
Sql
Private Sub Command2_Click()
On Error GoTo Err_Command2_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "Directors Meeting Day Form" stLinkCriteria = "[DirectorsMeetingDay]=" & "#" & Me![Combo0] & "#" DoCmd.OpenForm stDocName, , , stLinkCriteria Exit_Command2_Click: Exit Sub Err_Command2_Click: MsgBox Err.Description Resume Exit_Command2_Click End Sub Quote:
|
|
#6
|
|||
|
|||
|
Private Sub Command2_Click()
On Error GoTo Err_Command2_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "Directors Meeting Day Form" stLinkCriteria = "[DirectorsMeetingDay]=" & "#" & Me![Combo0] & "#" DoCmd.OpenForm stDocName, , , stLinkCriteria Exit_Command2_Click: Exit Sub Err_Command2_Click: MsgBox Err.Description Resume Exit_Command2_Click End Sub Iwells, is there any way i can learn ms access/sql/vb...my job requires all this ..if not advance level atleast basic level... i come home frustrated everyday...can you please help... or suggest how to cope with this... Rishy Quote:
|
|
#7
|
|||
|
|||
|
Hi Rishy,
On the first part, if your [DirectorsMeetingDay] is in a date/time format, then we need to take a look at the combobox for a couple of things. 1) In the combobox is the format for the column a Date/Time format. 2) If the above answer is yes, is this column the bound column for your combobox. In order for your command button to work properly, both the [DirectorsMeetingDay] and the [Combo0] must have the same Date/Time format. From the error message posted previously, it looks like the bound column maybe the index number of the row rather than the column containing your date/time field. A good book to start with, is by the publisher WROX titled Beginning Access 2000 VBA. It is a little outdated but will have alot of good basic and some intermediate vba code for you to learn and understand. It comes with a tutorial cd so you can use the practices with a database that's on the cd. I would recommend it to get started with. lwells |
|
#8
|
|||
|
|||
|
Iwells,
The suggestion which you gave for the dafault value is working in one case and not in the other. I do not know the reason. Private Sub Comments___Conditions_Change() Commentsdirectors.Value = commentsconditions.Text End Sub Private Sub LoanAmount_Change() Loanamtdirectors.Value = LoanAmount.Text End Sub This is what is am writng as a code. It gives me a error as "run time error 424" object required. The second one works not the first one. Can you please advise. Thank you Rishy Quote:
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Syntax error in date in query expression |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|