sdawson
Registered User.
- Local time
- Today, 19:29
- Joined
- Apr 22, 2003
- Messages
- 165
I've got a problem with the following syntax.
This code is a Click event in the form property.
I'm trying to open a form that has the same name as the field [Style] but can not get the syntax right.
The field [Style] can be one an number of options with a form of the same name.
The criteria works fine.
Dim stDocName as String
Dim stLinkCriteria as String
stDocName = [Style]
stLinkCriteria = "ID =Forms!stDocName!ID +1"
DoCmd.OpenForm stDocName, , , stLinkCriteria
The problem is how do I get the variable stDocName recognised in the DoCmd statement.
This code is a Click event in the form property.
I'm trying to open a form that has the same name as the field [Style] but can not get the syntax right.
The field [Style] can be one an number of options with a form of the same name.
The criteria works fine.
Dim stDocName as String
Dim stLinkCriteria as String
stDocName = [Style]
stLinkCriteria = "ID =Forms!stDocName!ID +1"
DoCmd.OpenForm stDocName, , , stLinkCriteria
The problem is how do I get the variable stDocName recognised in the DoCmd statement.