I have been creating macros and converting them to VBA to learn how to use code and not a macro for everything. I am having troubles getting the following situation to work.
User clicks on a button on my menu form that opens up a search form
Form Name: SearchFindingNumber
Unbound Text Box: SearchFindingNumber
OK Button Name: SearchFind
The user will enter the finding number into the unbound box (Number format is #-#).
When they click on the SearchFind button I want my InspectFindings form to open.
Form Name: InspectFindings
Field to match: FindingNum (which is an unbound box with the control source of: =[InspNumber] & "-" & [FindingNumber])
This is the command I have tried:
DoCmd.OpenForm "InspectFindings", acNormal, "", "[Forms]![InspectFindings]![FindingNum]=[Forms]![SearchFindingNumber]![SearchFindingNumber]", acEdit, acNormal
It doesn't open the finding - it opens a blank form like maybe it isn't finding that finding. I am sure my mistake is a simple thing to fix, but being somewhat new at VBA and the proper way of coding things, I am not sure what I have done wrong.
Thanks!
Ellie
**Using Access 97 at work**
**Using Access 2000 at home**
elliefant@qwest.net
User clicks on a button on my menu form that opens up a search form
Form Name: SearchFindingNumber
Unbound Text Box: SearchFindingNumber
OK Button Name: SearchFind
The user will enter the finding number into the unbound box (Number format is #-#).
When they click on the SearchFind button I want my InspectFindings form to open.
Form Name: InspectFindings
Field to match: FindingNum (which is an unbound box with the control source of: =[InspNumber] & "-" & [FindingNumber])
This is the command I have tried:
DoCmd.OpenForm "InspectFindings", acNormal, "", "[Forms]![InspectFindings]![FindingNum]=[Forms]![SearchFindingNumber]![SearchFindingNumber]", acEdit, acNormal
It doesn't open the finding - it opens a blank form like maybe it isn't finding that finding. I am sure my mistake is a simple thing to fix, but being somewhat new at VBA and the proper way of coding things, I am not sure what I have done wrong.
Thanks!
Ellie
**Using Access 97 at work**
**Using Access 2000 at home**
elliefant@qwest.net