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!

assign variable with double click

Status
Not open for further replies.

tlove161

Technical User
Feb 5, 2004
42
0
0
US
How can I assign a variable to the active record in a table with the double click event of a command button? I am somewhat knowledgeable of vba. I did a search but found nothing. Thanks.
 
I'm not really sure what you mean by:'assign a variable to the active record '.

DO you mean that you want to put a value into textbox on the form?

If so the code you would use would be like:

me.textboxname = value

I would be quite careful about using the double-click event AND the click event for the same control, if that's what you had planned.
 
Something like...

Dim db as DAO.Database
Dim strSQL As String
Set db = CurrentDb
strSQL = "UPDATE YourTable SET FieldName = YourVariable WHERE you need to identify the record here
db.Execute strSQL






Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top