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

if yes opens subform

Status
Not open for further replies.

rcreed1

Technical User
May 20, 2004
36
US
Hello,

I have started created two databases for my unit in the Army and now I am trying to tie everything together. One database has a list of names of all the people who are assigned positions for NEO (Non-combatant Evacuation Operations). Their titles are 'NEO Wardens' and 'NEO Repesenatives' and all their information is contained in one database I have created. The second database has all the information they report to me every month. What I would like to do is have a check box or option button on the form to my second database that asks "Are there any changes to your Wardens or Reps?" if the check box =yes then it will pull up the form in the second database where I can update that information.

The way I have it devised right now is the wardens and Reps are getting a cut down version of the second database on the information they send me every month. They will not have access to the database with all of their information (the first database I described) so on their form I would like to have an option button or check box that if =yes pulls up a subform where they can put in the changes to wardens or reps.

Since I am stationed overseas there is a continual change of perssonel and linking these two together will make everything a lot easier. Right now I have it devised so that there is a command button that will generate a report that looks the same as the form and then another command button that emails it in snapshot format so I will need to have this subform attached to that (however that is probably a question for later).

Since I am new to access and have been self taught in a short amount of time by using 'help', 'tech tips', and reading books I will by no means be insulted by an idiot proof explanation of this - infact it will be greatly appreciated - besides I am infantry.
Thanks for all your help
 
How are ya rcreed1 . . . . .

AceMan is Vietnam Vet (AirForce) - 67th F4 Fighter Support Group.

rcreed1 said:
[blue]if the check box =yes then it will pull up the form in the [purple]second database[/purple] where I can update that information.[/blue]
If I understand you correctly, you don't wanna pull up the form in the [purple]second database[/purple], you wanna pull up the form in the first, where the Wardens & Reps are?

Is that correct?

Calvin.gif
See Ya! . . . . . .
 
My main database is actually the one that contains all of the information that is sent to me every month. The one with the wardens and reps info is more like an address book. So when I am receiving their information and updating my main database if there is a change to who is now sending me the information (wardens or reps) I want it to open the form in my address book database.

I hope that explains it.

ps. Thanks for your service to our country
 
rcreed1

Assumptions:
- Contact database - wardens and reps
- Main database - reports, transaction data

This problem would be easier that when you are in the Main database, you have linked your tables to the Contact database. As long as the databases stay in the same directory / folder or you know where the each are, AND you can access them at the same time, this seems to me as a reasonable thing to do.

Note that people in the "Contact" database will not see the "Main" database in case you are concerned about security.

After linking the tables, while in Main, link to Contact, the only thing you then is copy the Contact form you want to use. (Unfortunately, Access does not allow you to link forms)

Then, either for the On Change event for the Check Box field or for the Before Update event for the record, have something along the lines of...
Code:
    Dim stDocName As String
    Dim stLinkCriteria As String
    
    stLinkCriteria = "YourVariableIfRequired"

    stDocName = "YourContactForm"
    DoCmd.OpenForm stDocName, acNormal, , , acFormAdd, , stLinkCriteria

Cheat: Create a command button to do this task. Then copy the code for the command to the event you decide to use.

Good luck on this, and hope you and your command stay safe.

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top