How do I do this in MS Access?

PicknGrin

Member
Feb 16, 2002
110
0
0

This will likely be an extremely simple matter, but I haven't been able to find the solution online. I've created a very simple Access database (using the GUI) to keep track of the services that I've billed for and whether or not I've received payment. The services fall into just a few categories, say 1-4.
In my form, I've created a combo box with a drop-down menu of the 4 service categories.
When I select category x, I want Access to automatically add the dollar value assigned to each category into the FEE column.
How would I do this? If it is a matter of programming commands, where do I find the window to enter them in? (I say this being a simpleton GUI user, but would much prefer to be able to do straight programming).

Thanks!
 

Traire

Senior member
Feb 4, 2005
361
0
0
Right click on the drop down box and choose properties.

Click on the event tab.

I believe what you want is an event for "On Change", so click the box with the "..." next to the On change field. You can either create a macro or write some VB code to enter the prices you want tu be updated.
 

PicknGrin

Member
Feb 16, 2002
110
0
0
Ah, ok, thanks. Problem is I don't know VB code... I just want the form to insert the corresponding service fee from the other table...

Originally posted by: Traire
Right click on the drop down box and choose properties.

Click on the event tab.

I believe what you want is an event for "On Change", so click the box with the "..." next to the On change field. You can either create a macro or write some VB code to enter the prices you want tu be updated.

 

KLin

Lifer
Feb 29, 2000
30,246
578
126
you can also use the after update event to trigger it. see attached code. All it's doing is setting whatever textbox you have on your form equal to the value that it looks up in the service fee field where the service category matches up. You can change the field/table names to whatever you need to make it work.