Avatar of TonyMannella
Flag for United States of America asked on

Help with MS Access-2010 VBA (Or Macro)- Allow user to populate form field based on entry into another form field



Access 2010

I'm currently developing a time/Expense system in an access database.  What I am trying to do is provide the user the ability to populate a form field if and only a prior form field is populated with the correct data.

I have two fields on my Expense form - 1 is a Expense code ID and the other is Mileage.  What I want to do is if the expense form field has an expense ID related only to mileage (text string is Mileage),  then and only then can they input the mileage amount but cannot enter anything in the Expense amount form field.  And, vice versa, if the user enters the mileage (it auto populates the mileage amount based on an calculation), then they cannot enter anything in the Expense Amount field.  See screen shot attached.  Any help would be appreciated
Microsoft ApplicationsMicrosoft OfficeMicrosoft Access

Avatar of undefined
Last Comment

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Thanks very much - worked like a charm
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.