Open from from "edit list items" option in data entry mode

Beemerang

Registered User.
Local time
Today, 23:49
Joined
Jan 25, 2014
Messages
67
Hi All

I have several comboboxes in my database from which users select values. However, in most cases, I do want to give them the option to add an item that does not appear while simultaneously updating the underlying table which stores those dropdown values. I have made use of the builtin "allow edit list items" feature of Access 2007 but the form always opens on the first record of the form on which they are to add the new item. Is there a way to specify that it should open in Data Entry view apart from using VBA?

Beem
 
You need to put code into the form's OnLoad event or you can use a macro if you prefer. You can even create temporary variables to set certain fields.

Here is a picture of what my OnLoad macro looks like for my contacts form. I used a template when I first started out so it was built-in. Because it was already done this way, i haven't bothered to change it to VBA although I do think VBA is preferable.

You obviously have to change the field names. Let me know how it works for you.
 

Attachments

  • OnLoadMacro.jpg
    OnLoadMacro.jpg
    49.2 KB · Views: 334
BTW, you can get away with only using the first two lines of the macro if you only want the form(s) to open to a new record and you don't need the data to transfer to the controls.
 
Thanks EternalMyrtle and Mihail for the replies! I am in a location with really poor internet access so I will take a look at your suggestions and let you know if I run into any issues.

Thank you for your help!

Beem
 

Users who are viewing this thread

Back
Top Bottom