Clear the form

dealwi8me

Registered User.
Local time
Tomorrow, 01:44
Joined
Jan 5, 2005
Messages
187
Can i clear all the form's fields without assign null value to each on seperately.
(something like delete current record)

Thank you in advance!
 
Do you actually want to delete the record from the database or just clear the fields for a new record to be added?

Col
 
Just click on the record selector ( left hand column on form) and click delete or cut record.

Would that help ?
 
ColinEssex said:
Do you actually want to delete the record from the database or just clear the fields for a new record to be added?

Col

I want to clear the fields for a new record to be added
 
Use an "Add New Record" command button using the wizard.

Col
 
i think you didn't understand what i'm trying to do.

On a field property i have a vba function that checks if that field already exists in another table. If it does, then i want to clear all the fields of the current record.
 
dealwi8me said:
i think you didn't understand what i'm trying to do.
I think it would have been nice to get the whole picture in the first place instead of having to guess all the time or try to prise more info from you.

Just how exactly are we supposed to know about this checking procedure you have magically mentioned now?

Col
 
DoCmd.GoToRecord , , acNewRec

Hope this helps?
 
If you had search the Access VBA help files for the Undo method then you would have found this...

The following example shows how you can use the Undo method within a control's Change event procedure to force a field named LastName to reset to its original value, if it changed.
Code:
Private Sub LastName_Change()
    Me!LastName.Undo
End Sub
The next example uses the Undo method to reset all changes to a form before the form is updated.
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
    Me.Undo
End Sub
 
Thanks everyone for the help :)

ColinEssex said:
I think it would have been nice to get the whole picture in the first place instead of having to guess all the time or try to prise more info from you.

Just how exactly are we supposed to know about this checking procedure you have magically mentioned now?

Col

I'm sorry for not having your experience and my english are not that good.

Thanks for trying to help me though, next time i'll try to be more specific.
 

Users who are viewing this thread

Back
Top Bottom