Share via

SET NULL VALUE WHEN OPEN A FORM

Anonymous
2019-07-06T11:40:26+00:00

Hello everyone! With decorations purpose, I'm wondering how to set value on text boxes into null at first time open the form instead of viewing all the data on text boxes

I've tried:


Private Sub Form_Load()

DoCmd.GoToRecord , "", acNewRec

End Sub


... and it worked but I thought it wasn't possible when tapping Next Record button. Could anyone give me some right solution, please?

Thank you!

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

ScottGem 68,830 Reputation points Volunteer Moderator
2019-07-06T11:45:32+00:00

Hi Thắng, I'm an independent adviser and can help.

If you want to open a form to a new, blank record, you have a few options. If you are opening the form from code, you can set the Edit mode to Add instead of Edit. This can be done in either VBA or a macro. If you always want the form to be used to only enter new records, you can set the Data Entry property of the form to Yes. You could use your method to go to a new record upon Load as well.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful