Missing field

GizmoT

Registered User.
Local time
Today, 00:54
Joined
May 28, 2003
Messages
86
I have a form that does all sorts of stuff, including adding the contents of one field (Amount) to another. If there is no data in the field, I need a message box to pop up and ask for the amount. I can't for the life of me think of how to do it. Anyone help?? Please!!
 
GizmoT said:
I have a form that does all sorts of stuff, including adding the contents of one field (Amount) to another. If there is no data in the field, I need a message box to pop up and ask for the amount. I can't for the life of me think of how to do it. Anyone help?? Please!!

On exit of the field or close of the form, (wherever you want) you'll need something along the lines of:

Code:
If IsNull([Me.FieldName]) then
  Msgbox "Field is empty .... etc etc"
  Set the focus back to that field so that the user is not allowed to move off of it until it's filled.

Else
  Do the next thing like go to next field or close form etc

EndIf
 
Ah - sorry, my mistake. The field that may or may not be empty, is not anything to do with the form. Let me try again.

The form looks up data in several different tables, and makes all sorts of calculations. For example:

CompanyTable![Amount]=CompanyTable![Amount]+CustomerTable![Cost]

Now if CustomerTable![Cost] is null, I want a message box to say

"please enter the cost here...." and to take that value, amend the Customer table and update the Company table.

Hope that makes more sense
 
HI - Hmmm. Sounds a bit confusing!! :) Not very good at visualizing things from descriptions. If you don't get any response from anyone, are you able to post a dummy copy of the db or some screen shots?
 
GizmoT said:
Ah - sorry, my mistake. The field that may or may not be empty, is not anything to do with the form
But doesn't the field appear on another form so that people can enter data? or to put it another way, How do people enter data?

If it does appear on another form, then Ally's original reply will ensure that the data gets entered.

Col
 
The field appears on a different form, but I wanted to avoid loading this form when I update the form in question. I have however discovered a way round, by introducing another field to the form. Sorry for confusing anybody - it was a difficult problem to explain, and the database is too complex for me to start stripping it down.



Thanks anyway guys. :D
 

Users who are viewing this thread

Back
Top Bottom