Full Version: controlling record set and control source
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
mhnaccess
I have a form that I need to edit 1 field in two different tables unrelated.
I use
private sub txt_tasks_got_focus()
me.form.recordset="mytable"
me.txt_tasks.controlsource="tasks"
end sub
to set the control source when this text box gets the focus. It works but Access starts blinking rapidlyand the mouse is an hour glass forever.
Oplan to use this logic for each text box to set the forms record source and contol's control source but it does not work.
HiTechCoach
I do not think this logic will be very successful or safe.
would not put this code in the got focus event maybe the after update event.
If you are need to take the data entered once and update two or more tables, that sounds like repeating data and should be avoided.
A lot better logic would be:
Enter the data into a text box and then use update queries to update the records in the after update event.
mhnaccess
Boyd,
Thanks for the reply,
Onoticed later that I made a mistake, I meant to use the RecordSOURCE , not the RecordSET.

Edited by: mhnaccess on Mon May 23 10:10:43 EDT 2005.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.