Use a combo box to open a related form

dgaletar

Registered User.
Local time
Today, 01:53
Joined
Feb 4, 2013
Messages
172
HELP! I set out over 7 days ago to accomplish what I thought was a fairly simple task; to add another search tool to our database. And here I am in the Access help forums!

First off I am using Access 2010. It is also necessary to note that I am very new to Access altogether.

My project is as follows:
I work at the Catholic University of America in Washington, DC. Strangely enough I am a mechanic here. We have about 80 vehicles that belong to the University itself, and are used by University staff members on a daily basis to perform different types of jobs. Our job is to keep all of them running.

The University has about 6 different tools to track different aspects of the vehicles, but none are synched together in any way. That is why I decided to "try" and design a database using Access 2010; to combine all of these details in one location.

So far everything has gone quite well... that is until this task came along.

Important information: While all of the vehicles are issued a number (CUA#) from our department when we get them, some of the departments re-number them with their own numbering system. Therefore ALL vehicles have a "CUA#", while some ALSO have an "Alternate ID" (ALT ID).

This task is to allow the team members to look up the vehicles information (which is located on the main form, frmVEHICLE_DETAILS_All) using either the vehicles CUA# or the Alt ID.
What have I done thus far:

  • Created the main form, frmVEHICLE_DETAILS_All, which contains the CUA# as the primary key, and the Alt ID as it's own column. T(Note: the CUA# field in a number field, while the Alt ID is a text field)
  • Created a form named frmALTID_LIST, which is a modal popup form
    • it consists of one Combobox, which is is CAPTIONED: "Select an Alternate ID#:", and is NAMED: Alt ID. (Right now it is not connected to anything, so it doesn't do anything.)
    • it also has a "CANCEL" button on it that is not set up yet. (But that part I can figure out.)
The help that I need is to be directed on how to make it so when a team member selects an Alternate ID from the drop-down list on the popup form (frmALTID_LIST), it opens the main form (frmVEHICLE_DETAILS_All) to the vehicles record that contains the same Alternate ID.

Also, I have spent way to long trying to do this task, so please don't be shy with information. While I have stumbled along thus far without a ton of help, I am not trying to learn the process for this task. I really don't see me needing it again any time soon. I tried it with a parameter query, a form filter, VBA (several different ways), etc., and nothing to this point has worked.

Thanks for the help guys!

dgaletar
 
Nope. Thanks, but I tried this before. Just to be safe I ran it again, and I am getting a MVB error popup:
Run-time error '3075':
Syntax error (missing operator) in query expression 'Alt ID = 138".
Oooops... Actually, I just figured out that I needed to be using 'Alt_ID' in the code. So I just changed it and now it is opening a blank form!?!

While we are at it, I need to eventually close the form for the drop-down when it opens the new form...
 
If it opens a blank form, either that value doesn't exist or the wrong field is being specified. Can you post the db here?

DoCmd.Close

with the appropriate arguments to close the form.
 
Apparently I can't. I tried and got this error message:

"Your submission could not be processed because a security token was missing.

If this occurred unexpectedly, please (Email) and describe the action you performed before you received this error."
 
But here is the layout for the main form (VEHICLE_DETAILS : Table):

CUA# Number Primary Key
TAG # Text Lic. Plate #
VIN Text VIN #
Year Date (ie: 2006)
Make Lookup RowSource is typed in
Model Text
Trim Level Text
Standard Seating Number
Inspection Due Date
Department Lookup from Department : Table
Alt_ID Text
Tag Due Date
Link Hyperlink
Attachments Attachment
 
HEY, pbaldy, I DON'T KNOW WHAT THE HECK I DID, BUT I DID IT!!! Thanks!!! I'm sure it was your code that got me over the hump.

If you have the time to help with some other small tasks, please let me know.

Otherwise, THANK YOU!
 
Glad you got it sorted out! I can certainly help with other tasks, but if it's a different topic the site admins would prefer you start a new thread. It's best to keep threads on a single topic, rather than a bunch of them. It makes it easier on people searching for answers later.
 

Users who are viewing this thread

Back
Top Bottom