Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem populating form

Status
Not open for further replies.

pd06498

IS-IT--Management
Dec 10, 2003
36
0
0
AU
In my database I am creating, I have a form that open on startup, which contains a warning to users about breaches of confidentiality etc (frmStartup). There is a field in this form that contains the branch name of the company. If this is blank or contains "XXX" then a further form will popup, requiring the user to input the name of the branch (frmLocation). This form is linked to a table (tblLocation).

Once frmLocation is updated, the branch name in frmStartup is updated to reflect the branch name.

Now, when the user clicks on the OK button on the frmStartup form, it closes the frmStartup, and opens a menu form (frmMenu). I want this form to also reflect the branch name, but when I try to link a text field to tblLocation or a query, the database tells me that tblLocation is already in use.

How can I overcome this problem.

I later want to use the branch name in reports as well.

Any assistance would be appreciated.
 
Hi

So are you saying you have a list of branches (tblLocation) and at any ontime a user is 'using' a single Branch ?

If yes, my usual solution to this problem is to have a sigle row table (tblCurrentBranch), in the front end if it is a split db, populate this single row table in a start upform, using a combobox based on the tblLocation, but bounf to tblCurrentLocation. To 'get' the current location include tblLocation in the recordsource of forms, reports etc or write a user function which retrieves the current location and populates whichever columns you want using syntax like =MyCurrentLocationFunction()

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Ken

My table tblLocation is restricted to one location name. Hence, each branch or location will have their own database. Once entered, it should not need to be changed again. There may be up to 200 branches, but each database will stand alone and will only relate to the branch where it is at.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top