Help with VBA code that populates field

thedude1971

Registered User.
Local time
Today, 12:47
Joined
Jun 16, 2011
Messages
10
Hi there,
I am using MSAccess2010 and I am struggling to write some
vba in my database. I'm not very good at the vba side of Access, so if someone could help me the code. I would be able to learn from that.
On my form, I have a Payment Type dropdown field.
When someone selects a payment type I want the code to calculate the end date. Then populate the End Date field with the answer.
I will be having a few payment types too, but for now on the dropdown I have two.
2/Month and £24/Annum

I have attached a basic version of my database in the job.
TIA.
 

Attachments

Don't use special characters( #$%@ etc) or embedded spaces in your field or object names. Get a naming convention that uses only alpha-numeric characters. You will save your self from many syntax issues.
 
Don't use special characters( #$%@ etc) or embedded spaces in your field or object names. Get a naming convention that uses only alpha-numeric characters. You will save your self from many syntax issues.


I will change my naming conventions for sure, thank you for that.

However any idea which command/s to attempt the code?

We were looking at the If then else command, but not sure.
 
Hi there,
We have written some VBA code now. The code kind of works, but seems to loop and lock after its running.

How do we get the code to stop after its finished? Or is there something wrong with the code?

Attached is a screen grab of the code.
TIA.
 

Attachments

  • Capture.JPG
    Capture.JPG
    45.8 KB · Views: 56

Users who are viewing this thread

Back
Top Bottom