PDA

View Full Version : Solved: VBA Error Box



FF Ethan
05-11-2010, 09:58 AM
So, I am very new to VBA can someone help me!
I was creating a form in Access and I made it, but i want a message box to pop up if there is no entry made when they try to save it. Can someone help me with this?

OBP
05-11-2010, 10:20 AM
FF Ethan, welcome to the Forum.
The users do not actually have to "Save" a record as Access does that automatically.
Do need all the fields on the form filled in or just one?

FF Ethan
05-11-2010, 10:22 AM
I would like them all to be full before it gets entered into my table.

OBP
05-11-2010, 10:59 AM
How many fields are there?

FF Ethan
05-11-2010, 11:02 AM
There is Four fields.

CreganTur
05-11-2010, 11:03 AM
There's a very easy way to deal with this. Open your table in Design mode. One of the properties is Required- if you set it to True then Access will not allow new records to be saved unless all Required fields are filled with a value.

HTH:thumb

FF Ethan
05-11-2010, 11:14 AM
I must be doing something wrong.
Its still imputing it into my table for some reason.
Maybe im not understanding you right.

FF Ethan
05-11-2010, 11:15 AM
Open my table in Design Mode right?

OBP
05-11-2010, 11:20 AM
Yes, the property Randy mentioned is a Field property.

OBP
05-11-2010, 11:28 AM
Did you set the property for all of the fields?

FF Ethan
05-11-2010, 11:28 AM
ugh... like I said I am new to VBA.
Im sorry I am making a big deal out of this but i really dont know what you guys are talking about I dont see which Property is Requred-?
Sorry

Imdabaum
05-11-2010, 11:35 AM
ugh... like I said I am new to VBA.
Im sorry I am making a big deal out of this but i really dont know what you guys are talking about I dont see which Property is Requred-?
Sorry

I don't think you'll see it on AutoNumber fields, but the others will appear like the image below. Change No to Yes and the record will not be saved for every field that is left blank where you have set this required field.

Welcome to the forum. Everything I learned in VBA I learned from necessity and this forum. It's a good place.

FF Ethan
05-11-2010, 11:39 AM
Perfect!!!! Thank You!! Everyone!
Zack would have helped me but he is on a Ridealong for his Paramedic school. He directed me to his site im glad I came. Lol he is probably just tired of me texting and calling him for answers.