A
alan at work
I want Access to open a form from an open one and the key
in both cases is the date. For some reason Access ALWAYS
uses the American date format when searching the 'new'
table/form and so can't find the data. Is there a way
around this. ALL PC's are using UK date format.
Below is the Basic subroutine. Do I need to alter/ modify
the [date] bit. Ive used this routine in the past but the
key was always a reference number.
Private Sub Command47_Click()
On Error GoTo Err_Command47_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Check sheet"
stLinkCriteria = "[date]=" & "#" & Me![date] & "#"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command47_Click:
Exit Sub
Err_Command47_Click:
MsgBox Err.Description
Resume Exit_Command47_Click
End Sub
in both cases is the date. For some reason Access ALWAYS
uses the American date format when searching the 'new'
table/form and so can't find the data. Is there a way
around this. ALL PC's are using UK date format.
Below is the Basic subroutine. Do I need to alter/ modify
the [date] bit. Ive used this routine in the past but the
key was always a reference number.
Private Sub Command47_Click()
On Error GoTo Err_Command47_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Check sheet"
stLinkCriteria = "[date]=" & "#" & Me![date] & "#"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command47_Click:
Exit Sub
Err_Command47_Click:
MsgBox Err.Description
Resume Exit_Command47_Click
End Sub