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

How to create a macro to fill a specific field in a form

P: 7
I am wanting to create a macro that will fill a specific field on a form and then go to the next record set. I have a blank field in the table that the form is pulling from. I want the user to be able to click a button I have inserted into the form which will go to the next record but I also want that button to fill in that blank field on the form with the users initials before moving to the next record. I do not want the user to type anything in here because I want the records to be consistent having the same information in that blank field everytime. If you can help me with this I would greatly appreciate it.
Sep 22 '10 #1
Share this Question
Share on Google+
3 Replies

P: 332
You can use the environ("username") to get the system username to fill you blank form.
If you use user and group permission features, then the method CurrentUser would do.
Sep 22 '10 #2

P: 7
I guess you could call me a newb with access I know just enough to get me by. I am trying to create a ticketing system through forms but I am very new to using forms. I have the form pull data from the table and every field is populated except the user field which I purposly left blank so I could track when a record has been completed. I do not want the user to type information into this field I want it populated automatcially once the user goes on to the next record. Im am unsure how to use your environ function in this form and how to designate what field to fill.
Sep 22 '10 #3

P: 332
You will likely have to dive into VBA to produce what you want. Then sky is the limit. You should start reading on the topic.
Basically, when "a record is completed" as you say, an event will trigger the filling of the blank field without the user having to type anything.
Sep 23 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.