1 form multiple tables

A

Army MI

I am having trouble figuring out the code i need but i have one form that 6
users access. But i have a list box with a record sorce of UNIT so they can
click on thier personal table. and i Have set up tables for each of the
users call DEROG1-6. but what i cant get to work is when they click on thier
name in the list box for it to change the form record sorce to thier table
for data entry. or do i need to try something differnt.

"BRUTE FORCE: If it doesnt work, you're just not using enough"
 
M

Maarkr

I don't have a clue why anyone would use a table for different users, but if
you want to change the source based on the combo selection, it would be in
the 'after update' event of the combo: something like

me.recordsource = me.comboname
refresh

where the combo lists the table names
or if that's not it, post your after udpate code for the combo

but I have a feeling your database is not setup properly if you're having a
table for each user. Why have a personal table? I would have each record
list the user so you only need one table.
 
J

John W. Vinson

I am having trouble figuring out the code i need but i have one form that 6
users access. But i have a list box with a record sorce of UNIT so they can
click on thier personal table. and i Have set up tables for each of the
users call DEROG1-6. but what i cant get to work is when they click on thier
name in the list box for it to change the form record sorce to thier table
for data entry. or do i need to try something differnt.

You need to try something different.

Storing data (a user's name essentially) in a tablename is Very Bad Design.

I'd combine all six user tables into one table with an additional field UserID
(or Unit or whatever the DEROG1 value refers to), and give the user a Query
filtering on their personal ID.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top