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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prompt User in Form One Time for All Reports in Database 2

Status
Not open for further replies.

jercsr

Technical User
Sep 15, 2003
16
US
Hello,

I have a single access database with multiple reports. Common among all reports on the page headers are a Project Number, Project Name, and Task.

Can anyone recommend the best way to have a pop-up form prompt a user one time for this information when the database is opened, and have that information stored so that all reports in the database read in the Project Name, Number and Task? I tried having the form simply write a record to a database with these three fields, but I want to prevent them from entering multiple records.

Any ideas?

Thank you in advance.
 
When the user writes the values each time to a record... just date stamp it and then only use the record with the Max of the date stamp to determine the values for project number, project name and task.

HTH
 
One way - Let the user enter the information in a form AND leave that form open - you can minimize it or whatever - then simply reference that form for all of your queries and reports.

OR

Enter it once and keep in in Global variables which you reference from your other routines. (I prefer method 1). There are other ways.


Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
HTH,

Thank you. As an alternative, is there a way to simply lock a table to have a maximum of a single record. That way, if the Task changes, they can simply edit the record? If not, I'll try your idea.
 
Traingamer,

Thank you too! I actually think option two might work best. Since each Project Task will be it's own database, I only want one entry for the Number, Name and Task for each database. If I pass their entry to a variable, then is it locked in until they edit the record?

Thank you
 
Since each Project Task will be it's own database, I only want one entry for the Number, Name and Task for each database.
You lost me there. How many users will be accessing the database at any one time? If only one user, just save the default values in a "control" table with one record (e.g. id="Dafault") and store those fields there. If more than one user at a time, I'd use one of my other suggestions.


Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Greg,

Sorry about the confusion. In most cases, a single user is going to open the database and print the reports for the project. Therefore that person only needs to enter a single record at the startup of the database for the "Project Information".

How then do you create a "control" table where the user enters the values in and moves on to open/print the reports?
 
create a new table
CID - type text - primary key
projectnumber - same type as other table
Project Name - same
Task - same
save table as tblControl

Enter one record - CID= Default
rest of data whatever

Create a query qControl
Select tblControl.* from tblControl where tblControl.CID="Default"

use qControl as the RecordSource for a form that show the three fields we're discussing. Remove ALL record navigation from the form (that way it only opens this record) - have the form open at startup - user changes data (if needed)

Then, the fun part - Use the same query (qControl) and link all of your queries with that one. That way you'll always use those values (and can still change them).

Seems a lot more complicated than leaving a form open, but it'll work for SINGLE USER databases.

I'm sure there are ways to simplify...

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Greg,

Can't thank you enough. I'll try both methods to see which seems to work best for the users.

Thanks again!

Jeremy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top