AutoFillNewRecord For combo boxes

G

Guest

I have a form that I use AutoFillNewRecord routine to auto fill the fields
for the next record. At first ALL my fields were text boxes and all worked
great. I then changes 1 of those fields to a combo box and now all the text
boxes still work, but the new combo box does not. It has the same name as the
text box was. I even created a new text box and that one works ok.
Does AutoFillNewRecord work with combo boxes?
My AutoFillNewRecord code came from MS suggested code.

Thanks
 
A

Allen Browne

Presumably you are talking about the code from this kb:
http://support.microsoft.com/kb/210236/en-us

There doesn't seem to be anything in that code that should work for text
boxes but not combos. You say it has the same name, so I don't see why it
should miss out.

The Name AutoCorrect feature often confuses Access about what something is
called. You might like to make sure to boxes are unchecked under:
Tools | Options | General | Name AutoCorrect
Then compact the database:
Tools | Database Utilities | Compact/Repair
Then make sure the form's On Current property is set correctly.

If you can't get it to work, there's another approach in this article:
Assign default values from the last record
at:
http://allenbrowne.com/ser-24.html
Instead of having to set up text boxes with the names of all the controls
you do want to carry forward, this one carries them all forward except for
any you specify in the exception list.
 
G

Guest

Allen,
Since there was only 3 fields on this form and you suggested it should work
ok, I jusst deleted th eform and started over. The new form works!!!!

Thanks for the help and the new info you suggested.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top