Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I auto delete blank field in a table

Status
Not open for further replies.

mondoray

Technical User
Jul 28, 2003
134
AU
Guys,

I have a form linked to a table when it opens it goes to a new record via code. This form (data input)is part of a tab style form structure that is the startup screen of the db. Page0 Intro, Page1 Data Input, Page2 Report Creator, etc.

What I find is that when the operator goes between pages or hits the save record on the data input form the table can be populated with blank entries.

Is there a way to auto delete the blank entries from the data input forms link table when the form looses focus or similar.

mondoray [ponder]
 
Hi,
You have to stop the user saving blank records by some type of code that works OnClick event of the Save button.

Something like
Private Sub CmdSave_Click()
If Me.TxtSomeText.text=" " then
MsgBox "you didn't enter the data"
Me.TxtSomeText.SetFocus
End If
End Sub
come back if there is more to know
regards

Zameer Abdulla
 
The usual way is to enforce the validation rules in the BeforeUpdate event procedure of the form.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks Guys.

PHV I think I will go with your idea. Can you help with suggested code?

mondoray [ponder]
 
Simply play with the Cancel parameter and/or the UnDo method if the actual data aren't valid.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
PHV,

I'm not 100% sure of the process you mentioned.
Can you give further help?

Thks

mondoray [ponder]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top