UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> controlling record set and control source    
 
   
mhnaccess
post May 20 2005, 04:01 PM
Post #1

UtterAccess Member
Posts: 46



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.

I plan to use this logic for each text box to set the forms record source and contol's control source but it does not work.
Go to the top of the page
 
+
HiTechCoach
post May 20 2005, 07:33 PM
Post #2

UtterAccess VIP
Posts: 18,396
From: Oklahoma City, Oklahoma



I do not think this logic will be very successful or safe.

I 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.
Go to the top of the page
 
+
mhnaccess
post May 23 2005, 09:07 AM
Post #3

UtterAccess Member
Posts: 46



Boyd,
Thanks for the reply,
I noticed 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.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th May 2013 - 06:03 PM