Problem populating form and report text field

pd06498

Registered User.
Local time
Today, 17:28
Joined
Dec 30, 2003
Messages
80
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.
 
Create a module and declare a vatiable

Public bLoc as string 'branch location


then on the close event (or after update event) of frmStartUp or what ever just put

bloc = Me.BranchLocationFieldName

then on the load event of your main menu create a text box and on the load event of the frmMenu put

Me.NewFieldName = bloc

HTH

Dave
 
Old Soft

I understand what you are suggesting, but I am just not up with modules etc. Can you advise how I should create the module, or more particularly, the code.

I can handle the reference to the module etc, just stumped with creating modules.
 

Users who are viewing this thread

Back
Top Bottom