Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening forms from another form 1

Status
Not open for further replies.

kpryan

Technical User
Aug 24, 2005
282
0
0
US
Hi all
Need some advice with this please.
I use a form with a texbox (AcctNo)This text Boxes data has specific code ie: 4-1000. When I dbl click on this text box it opens a other form to show specific data relating to that code.
Inititally I set the Data type to long integer and the code used was ie: 41000. This will open the form when I use the following code and show relevant data;
"DoCmd.Openform "form42", , , "acctno=" & Me.AcctNo"

But the problem is that when I set the Data type to 'text' and use the code ie:4-1000 I get a debug issue. I actually want to use codes ie: 4-1000 and not 41000.
Is it possible to do this with a text box Data type set to 'Text' and not 'number'


kp
 
Try this:

DoCmd.Openform "form42", , , "acctno=" & "'" & Me.AcctNo & "'"

you gotta put quotes around the text data type so it looks like: acctno = '4-1000'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top