Solved Adding New Record from combobox data

swift_ingress

New member
Local time
Today, 19:36
Joined
Mar 12, 2020
Messages
4
Hi all,

I have a simple cascading combobox form: Vehicle Manufacturers and Vehicle Models (this is just a test case for proof of concept). Values are:
FerrariModena
FordGT

I'm trying to setup a button so that if a field value doesn't exist, the user can create a new record without having to re-enter data.
Eg: First combobox, user selects "Ferrari". Second combobox, user discovers that "Spider" doesn't exist. They enter the value "Spider" then click the button "Add New Vehicle". Now I get that they would only have to insert one extra field value in this example if they went to a "New Record" and started from blank fields, but this is just a test database for something much larger.

While I understand that Access is designed for data to be entered into a blank "New Record", I'm trying to save the user from re-entering data, or having to look up the database first before entering in the new data (especially when there's up to 10 comboboxes with complex information).

Would this be possible using either macros or VBA to something like onClick, createRecord, value=Forms![vehManufacturer], value=Forms![vehModel] (I'm just writting short hand of the concept, I don't have any experience with VBA or marcos)?

Thanks in advance,
Swift
 
Hi. Look into the Not In List event of a Combobox or the List Items Edit Form property.
 
Really "Model" should be in another table and the combo boxes help the user select them. You wouldn't want to allow users to type in whatever, which defeats the purpose of validation via limiting to a list.

There has to be a car make/model database out there, just like zip codes, to help prepopulate it.

Just my $0.02
 
Thanks DBguy, that Not in List event seems to be what I'm after.


This looks like it suits my needs. It seems that the things I want to do with Access are going to require that I have a much more in-depth knowledge of Access and VBA in particular. If you have any study guides, websites or video channels that you recommend, I'm all ears. In any case I'll mark this as solved. Thanks again.
 
Thanks DBguy, that Not in List event seems to be what I'm after.


This looks like it suits my needs. It seems that the things I want to do with Access are going to require that I have a much more in-depth knowledge of Access and VBA in particular. If you have any study guides, websites or video channels that you recommend, I'm all ears. In any case I'll mark this as solved. Thanks again.
Hi. Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom