Open another form if input is item in list (1 Viewer)

cclark9589

Registered User.
Local time
Today, 11:48
Joined
Sep 22, 2008
Messages
79
Access 2007

Fairly certain I have seen the answer to my question in this forum before but I sure haven't had any luck finding the solution. My apologies in advance for having to ask this question.



I have a database that serves two purposes:
  1. Foremost is to build a list of contacts within our district. Nothing fancy; first name, last name, league, email and role.
  2. Secondly is to record who has attended various clinics conducted by our district.
frm_Names is used to enter information for #1 above. First Name, Last Name, League, Email and Role. This information is stored in tbl_Names.

frm_Attendance is used to enter the names of those who show up for the clinics and has but 3 fields: Full Name, League/Dist and Clinic Year.

Full Name is a combo box using qry_Names.
League/Dist uses dlookup to return the league/dist name from qry_Names.
Clinic Year uses =Year(Now()) as the default value.

If a name isn't in the list of Full Names, I want a msg box to appear stating that name isn't in the list and when "Ok" is clicked, frm_Names will open (modal? Popup?) so that the information for someone new can then be added to tbl_Names using frm_Names. Once frm_Names is closed I want to return to frm_Attendance.

Does any of this make sense? How do I do this and where do I place the code?

Please try to remember that I am very dangerous when using Access and can easy inflict pain upon myself i.e., please try to reply in plain simple English that even I can understand. :D

Thanks so much in advance.

Another quick question: any suggestions on how I might frame my search parameters for future reference?
 

boblarson

Smeghead
Local time
Today, 11:48
Joined
Jan 12, 2001
Messages
32,059
If you are using Access 2007, you shouldn't need ANY code to do this.

There is a setting in the control (combo box) to show which form to open when adding a not in list item. Once you've set that it will open that form for you and when you add the new value and close the form it will be added to the combo.
 

boblarson

Smeghead
Local time
Today, 11:48
Joined
Jan 12, 2001
Messages
32,059
Another quick question: any suggestions on how I might frame my search parameters for future reference?
Use Google to search the site instead of the normal search function.

See here for how.
 

cclark9589

Registered User.
Local time
Today, 11:48
Joined
Sep 22, 2008
Messages
79
Simple enough even my thick head understood the answer!

That did the trick Bob. Thanks.

Hope you had a great Thanksgiving surrounded by plenty of family and friends.
 

boblarson

Smeghead
Local time
Today, 11:48
Joined
Jan 12, 2001
Messages
32,059
Simple enough even my thick head understood the answer!

That did the trick Bob. Thanks.

Hope you had a great Thanksgiving surrounded by plenty of family and friends.

Glad it worked for you.

As for the Thanksgiving. It went pretty well, although my turkey got done about 2 hours ahead of schedule so we went into breakneck speed trying to get the other stuff done. We did it and it tasted wonderful. But I'm tired today. I wish I had either holiday pay or vacation pay so I could have taken today off. I am pretty tired (was up until 2am between Wed / Thurs getting the turkey finished defrosting as it was a huge 25 pounder).
 

Users who are viewing this thread

Top Bottom