Form Loading too slow

rishi

Registered User.
Local time
Today, 10:03
Joined
Oct 2, 2002
Messages
24
I have created forms in access with unbound controls which are all connected together as forms on tab. In order to populate the values in the unbound control on selecting "CID" (which is what is common among all tables) i have written the code in "On current" event of each form. This makes the whole process too slow which is annoying for the data entry person. I would like to know if there is a faster mechanism or way to speed up the process. Also i have written the code on each control's update event too, so as to write the updated value to the corresponding field each time its is updated. Could someone help me do this. Or is there a way to populate the unbound controls only when the corresponding tab is selected. Which event should i write the code on.
 
Is there a reason why you are not binding your controls to an underlying datasource.?
 
Yes..There are check boxes, where there can be multiple boxes selected and for each box checked, a record is entered in the related table different from the table linked to the form..And in one of the form, i have unbound textboxes too. The unbound controls write to a table different from the table linked to the form. So instead of having a subform, i have unbound controls with update events writing to the concerned table.
 
Can you not add all the relevant tables / fields to a query and use that as the recordsource?
 
I don't know how to do that. I am jus' using the checkboxes to avoid creating/using too many subforms. Also i am already too deep into the project to make any big changes. So i was looking to jus' put the "on current" code for each form in a different place to speed up the data loading process such that it only populates the fields when the tab or form is selected.
 
Using code to populate a recordset is relatively slow and prone to errors if your code is not watertight. Have a look at the MS samples for inspiration on populating forms with records.
I'm surprised that you have got so deep into the project without being aware of using queries to their full capabilities.

I strongly recommend that you do not pursue the code option but look at the many ways of populating a form's recordsource before continuing - The change now will make development a lot easier later.
 
So where do i need to refer to inorder to view the samples for populating forms with records. Could you suggest please. Thanx for all your help so far.
 
The Northwind.mdb sample is shipped with MS Access and is normally in the Office/Samples Directory. If you cannot track it down by browse or search, it will be on the installation CD - it is online here
http://www.microsoft.com/downloads/...c8-b91a-4603-8467-20215e441528&DisplayLang=en

and you can use the MS download area to search for more Access samples

There is also a good download here
http://support.microsoft.com/defaul...port/kb/articles/Q164/1/72.asp&NoWebContent=1
for help in getting the basics of a Db right first time.
 

Users who are viewing this thread

Back
Top Bottom