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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

clicking a text box, and making a macro read the text in it...

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have this form that has a bunch of text boxes in it, and I want to make just one macro for all of them. (activate the macro by double-clicking it). Then I want it to bring up another form with the same type of info. Like I want to double-click on a text box with the word "pizza," and then bring up a form, that explains what pizza is.
Example - (In a Macro...)

Condition
[current selection]=[forms]![form1]![text box1]

I prefer it to be in macro form, but any suggestions would be very helpful.
 
I can't help you with the macro, but I can help you if you want to use code. I have the double click event for the text box holding the ID number of the record to read:

DoCmd.OpenForm "frmFormYouWantToOpen" 'opens form Issue for single record view
Forms![frmFormYouWantToOpen].Filter = "[ID] = " & Me![txtID] 'filters on the field that was selected in this form
Forms![frmFormYouWantToOpen].FilterOn = True 'turns filter on

[ID] is the primary key in the table that feeds the form
and Me![txtID] refers to the field that I just double clicked on to get to this point.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top