By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,156 Members | 989 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,156 IT Pros & Developers. It's quick & easy.

Form Does Not Go To New Record

P: n/a
I have a form with about 30 fields. Much of data entry for this form involves
the same data for many of the fields. To save typing time, in the form's
AfterUpdate event I run a procedure that sets the defaultvalue property of each
field to the value of that field in the last saved record. Essentially what
happens is when a record is saved it becomes the default new record in the form.
I have some comboboxes on the form that draw their data from tables that have
only one field. When I make a selection in any of these comboboxes for the
current record and then click on the new record button in the navigation
buttons, the AfterUpdate event runs fine and the default values are set.
However, the form does not go to the new record. I have to click on the new
record button a second time to move the form to the new record. When the form
moves to the new record, the default values are what they should be. I know the
procedure to change the default values runs the first time a click the new
record button because I put a MsgBox in the procedure and it pops up.

Does anyone have any ideas why the form does not go to a new record the first
time I click the new record button and does anyone have any ideas why this
behaviour occurs when values are changed in the comboboxes?

Thanks!

Steve
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Just a suggestion, Steve

Double-check your code to see if you missed the ".DefaultValue" bit for any
of the combos. If you actually assigned a value to the combo instead of
assigining its DefaultValue property, you would be dirtying the form again
in its AfterUpdate event, and that would stop it from moving to the new
record.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Steve" <sp**@nospam.spam> wrote in message
news:OX*****************@newsread3.news.atl.earthl ink.net...
I have a form with about 30 fields. Much of data entry for this form involves the same data for many of the fields. To save typing time, in the form's
AfterUpdate event I run a procedure that sets the defaultvalue property of each field to the value of that field in the last saved record. Essentially what happens is when a record is saved it becomes the default new record in the form. I have some comboboxes on the form that draw their data from tables that have only one field. When I make a selection in any of these comboboxes for the
current record and then click on the new record button in the navigation
buttons, the AfterUpdate event runs fine and the default values are set.
However, the form does not go to the new record. I have to click on the new record button a second time to move the form to the new record. When the form moves to the new record, the default values are what they should be. I know the procedure to change the default values runs the first time a click the new
record button because I put a MsgBox in the procedure and it pops up.

Does anyone have any ideas why the form does not go to a new record the first time I click the new record button and does anyone have any ideas why this
behaviour occurs when values are changed in the comboboxes?

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.