If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
null default values on a form
Hi,
bet this question has been asked befo i have created a form so a user can add new records and edit existing ones. For editing purposes my form also has a search drop down by a record number. When i open the form it always shows me the first record from the table, but i just want it to be copmletely blank until a user choses his record for editing. If i change Form properties (Data Entry =Yes) it works but Search function does not work at all. Thanks Mike |
#2
|
|||
|
|||
null default values on a form
"Mikhail Bogorad" wrote in message
... Hi, bet this question has been asked befo i have created a form so a user can add new records and edit existing ones. For editing purposes my form also has a search drop down by a record number. When i open the form it always shows me the first record from the table, but i just want it to be copmletely blank until a user choses his record for editing. If i change Form properties (Data Entry =Yes) it works but Search function does not work at all. If you want your form to start at the new (blank) record, but still show all existing records, you can put this code in an event procedure for the form's Load event: '----- start of code ----- Private Sub Form_Load() Me.Recordset.AddNew End Sub '----- end of code ----- The same effect can be achieved with: '----- start of code (alternative) ----- Private Sub Form_Load() RunCommand acCmdRecordsGoToNew End Sub '----- end of code (alternative) ----- -- Dirk Goldgar, MS Access MVP Access tips: www.datagnostics.com/tips.html (please reply to the newsgroup) |
#3
|
|||
|
|||
null default values on a form
On Feb 4, 3:27*pm, "Dirk Goldgar"
wrote: "Mikhail Bogorad" wrote in message ... Hi, bet this question has been asked befo i have created a form so a user can add new records and edit existing ones. For editing purposes my form also has a search drop down by a record number. When i open the form it always shows me the first record from the table, but i just want it to be copmletely blank until a user choses his record for editing. If i change Form properties (Data Entry =Yes) it works but Search function does not work at all. If you want your form to start at the new (blank) record, but still show all existing records, you can put this code in an event procedure for the form's Load event: '----- start of code ----- Private Sub Form_Load() * * Me.Recordset.AddNew End Sub '----- end of code ----- The same effect can be achieved with: '----- start of code (alternative) ----- Private Sub Form_Load() * * RunCommand acCmdRecordsGoToNew End Sub '----- end of code (alternative) ----- -- Dirk Goldgar, MS Access MVP Access tips:www.datagnostics.com/tips.html (please reply to the newsgroup) Thanks Dirk! |
Thread Tools | |
Display Modes | |
|
|