tevans9104
New member
- Local time
- Today, 16:31
- Joined
- Aug 30, 2007
- Messages
- 1
I need some help! I am trying to open a form with a DoCmd.Openform "frmname",,,strcriteria. The strcriteria is DIM as string with a value of strcriteria = "[txtUserId]=" & Me.txtLoginName
The txtUserId is the bound field on the frmname and the txtLoginName is the combo box selection on this form that will call the frmname on my cmdSave action code. The prompt I receive before the openform action is asking for a parameter value for the value of the txtLoginName from the screen. If I enter in the same value that I just entered into the combo box it accepts the value and performs the action and opens the form with the record that I just save like it is suppose to do. I would like to eliminate the prompt for the parameter value and I just can't seem to eliminate it with enclosing the Me.txtloginname field. I am not able to compare the value of txtLoginName and access seems to be looking at this like a parameter instead of comparing the value of the two strings. txtUserid is defined as a string.
Please let me know what I am doing wrong or please give me a work around. Any help you can give me would be greatly appreciated.
Tom
The txtUserId is the bound field on the frmname and the txtLoginName is the combo box selection on this form that will call the frmname on my cmdSave action code. The prompt I receive before the openform action is asking for a parameter value for the value of the txtLoginName from the screen. If I enter in the same value that I just entered into the combo box it accepts the value and performs the action and opens the form with the record that I just save like it is suppose to do. I would like to eliminate the prompt for the parameter value and I just can't seem to eliminate it with enclosing the Me.txtloginname field. I am not able to compare the value of txtLoginName and access seems to be looking at this like a parameter instead of comparing the value of the two strings. txtUserid is defined as a string.
Please let me know what I am doing wrong or please give me a work around. Any help you can give me would be greatly appreciated.
Tom