closing/opening tables when switching forms (1 Viewer)

Jacko

Registered User.
Local time
Today, 07:38
Joined
Jun 17, 2002
Messages
10
Hi all,
I have a query thats most likely simple to answer and just have 'mind block!'
I have several forms and on each form i have added a listbox that references data from 1 table and a listbox that references its data from a different table for each form ie form 1 = table 1 form 2 = table 2 etc....my problem....when i switch between forms the previous form closes and new form opens, the listbox that references the same table regrdless of form prior to it loading i get a message saying that the table is open or locked by another user or opened exculsively?
What am i missing? i figure i need to close that table and then reopen it once the 2nd form loads via code maybe.?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 02:38
Joined
Feb 19, 2002
Messages
43,550
Try basing your forms and listboxes on different queries rather than on the tables.
 

Jacko

Registered User.
Local time
Today, 07:38
Joined
Jun 17, 2002
Messages
10
yeah, but i have to have a reference to the tables to populate the listboxes and then on thier selection have them update to text boxes within the form(s)
explain further to help if you can:)
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 02:38
Joined
Feb 19, 2002
Messages
43,550
I believe the problem is caused when multiple open objects refer to the same table object. It is best to base the forms and combos on queries anyway. Even though the queries will still refer to the same base table, I think the error will go away. Take 5 minutes to create the suggested queries and see if that fixes your problem.
 

Users who are viewing this thread

Top Bottom