Hello,
I am trying to open a form based on a records PrimaryID number, in this case it is called ProposalNumberID. The VBA code I'm using to do this is:
The error I'm receiving is "run-time error '3464' data type mismatch criteria expression" and is occurring on the whole line.
Some background info on the issue:
I originally had the variable as "[ProposalNumber]" but I just recently changed my Primary Key from ProposalNumber (Indexed, no duplicate field) to ProposalNumberID (an autonumber). I have fixed all relationships and I have added the PrimaryID field to the report and form and made it non-visible. So everything should be working, but I may have missed something.. because its not working..
I'm at a loss of how to proceeded so any help would be greatly appreciated.
I am trying to open a form based on a records PrimaryID number, in this case it is called ProposalNumberID. The VBA code I'm using to do this is:
Code:
Private Sub
Proposal_Number_Click()
DoCmd.OpenForm "frmPROPOSALINFORMATIONInputForm", , , "[ProposalNumberID] = '" & Me.[ProposalNumberID] & "'"
End Sub
The error I'm receiving is "run-time error '3464' data type mismatch criteria expression" and is occurring on the whole line.
Some background info on the issue:
I originally had the variable as "[ProposalNumber]" but I just recently changed my Primary Key from ProposalNumber (Indexed, no duplicate field) to ProposalNumberID (an autonumber). I have fixed all relationships and I have added the PrimaryID field to the report and form and made it non-visible. So everything should be working, but I may have missed something.. because its not working..
I'm at a loss of how to proceeded so any help would be greatly appreciated.