Assigning date in VB for Access database
-
Hi I am having a problem assigning a date to a date field in an Access database using VB. I know how to do it using a string. Dim stLinkCriteria As String stLinkCriteria = "[Name] = 'whatever'" Do I somehow use the #'s ? Thanks Nitin
-
Hi I am having a problem assigning a date to a date field in an Access database using VB. I know how to do it using a string. Dim stLinkCriteria As String stLinkCriteria = "[Name] = 'whatever'" Do I somehow use the #'s ? Thanks Nitin
try... Dim strLinkCriteria as String strLinkCriteria = "MyDate = #" & Me.ctlWhatever & "#" the principle being that 1) any string that can be evaluated as a date, and 2) is enclosed in #'s, will 3) be evaluated as a date, so if Me.ctlWhatever.Value = "2/28/03" then... strLinkCriteria = "MyDate = #2/28/03#" 'm/d/yy :zzz: no matter where you go, there you are