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!

Linking forms when field contains "/"

Status
Not open for further replies.

helpmonny

Technical User
Feb 25, 2002
21
0
0
GB
I'm trying to add a button to a form to open a second form and display data for the related record (using the wizard). The linking field is called our_ref. However, the values in this field are like NL/1/2/4 and it doesn't seem to be able to link them, I'm assuming because of the '/'. How do I get around this? Or is the / nothing to do with my problem? The error message says "There was a problem accessing a property or method of the OLE object
 
Here's two approachs I use, neither of which requires linking forms.

If form2 ALWAYS opens from form1 then form2's record source can be hard coded to select the record that matches forms![form1]![yourcriteriacontrol].

If form2 can open from many places then leave the record source alone and from form1
DoCmd.OpenForm "form2", , ,"somefield = 'NL/1/2/4'"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top