daninthemix
Registered User.
- Local time
- Today, 12:30
- Joined
- Nov 25, 2005
- Messages
- 41
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Logins"
stLinkCriteria = "[ID]=" & "'" & Me![lstLogins] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
This code is on the doubleclick event.
lstLogins is sourced from this: SELECT Logins.[ID], Logins.[Login for] FROM Logins WHERE (((Logins.Customer)=[forms]![customers]![customer]));
When i run it I get a VB error "The OpenForm action was cancelled", and the debugger stops on the last line above (Do.Cmd...)
Any ideas why?
I know [ID] is a long integer, but I tried formatting it with Str just in case and it made no difference
Dim stLinkCriteria As String
stDocName = "Logins"
stLinkCriteria = "[ID]=" & "'" & Me![lstLogins] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
This code is on the doubleclick event.
lstLogins is sourced from this: SELECT Logins.[ID], Logins.[Login for] FROM Logins WHERE (((Logins.Customer)=[forms]![customers]![customer]));
When i run it I get a VB error "The OpenForm action was cancelled", and the debugger stops on the last line above (Do.Cmd...)
Any ideas why?
I know [ID] is a long integer, but I tried formatting it with Str just in case and it made no difference
