By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,292 Members | 1,379 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,292 IT Pros & Developers. It's quick & easy.

table 1 < - form -> table 2

P: 36
Hi all,

What is the easiest way to relink a single form to different tables
Nov 26 '06 #1
Share this Question
Share on Google+
7 Replies


PEB
Expert 100+
P: 1,418
PEB
Yeah.. using multi tables... need more efforts! It's sure!

So you need VBA..

In On current event or where you need in the form module you type:

Me.Recorsource="Table1"
Nov 26 '06 #2

nico5038
Expert 2.5K+
P: 3,072
It's strange to have one form template linking to multiple tables.
Normally you have different tables that have a unique set of fields.
When there are multiple tables with the same structure this often points to a not normalized database design. Like a tblOrdersJan, tblOrdersFeb, etc...

In such a case it's better to create one table and have the months as a selection to filter the "master table".

Can you elaborate why this is needed ?

Nic;o)
Nov 26 '06 #3

P: 36
Because I need different users to be able to access their own tables using only one form. so instead of creating a form and a table for each user I thought it would be easier to have one form that links to different tables depending on the user
Nov 26 '06 #4

nico5038
Expert 2.5K+
P: 3,072
Hmm, in such a case I would create one "master table" with an additional "username" field. When the users can have the same unique ID to the rows the it needs to be defined as part of the unique (composite) key.
Thus the selection can be by a simple filter that's applied when the form is opened.
This will also ease reporting "accross" multiple users...

Getting the idea ?

Nic;o)
Nov 26 '06 #5

P: 36
Hmm, in such a case I would create one "master table" with an additional "username" field. When the users can have the same unique ID to the rows the it needs to be defined as part of the unique (composite) key.
Thus the selection can be by a simple filter that's applied when the form is opened.
This will also ease reporting "accross" multiple users...

Getting the idea ?

Nic;o)

Yes I do. I think maybe creating different tables would be easier to move them around (i.e. to different PC) if that user was for example needed to take his info with him on his laptop
Nov 26 '06 #6

nico5038
Expert 2.5K+
P: 3,072
When a user needs a copy of his data you can still use one master table and a report (or e.g. an excel sheet) to export the data when needed.
When the user needs to maintain his data on the laptop then it's getting more complex and in general I code the data exchange myself, although Access does has a database replication function. You're however warned as this replication seizes to exist in Access 2007.

Does your user settle with a "read-only" copy of his data ?

Nic;o)
Nov 26 '06 #7

NeoPa
Expert Mod 15k+
P: 31,661
You may be flogging a dead horse here Nico.
We've (not just me) tried to get this concept across in other threads but there's no response as yet :(.
Nov 27 '06 #8

Post your reply

Sign in to post your reply or Sign up for a free account.