Change combobox value when form is opened?

JP Romano

New member
Local time
Today, 17:39
Joined
Feb 19, 2009
Messages
9
30 min into my first project with Access 2007 and am making decent progress, though it's quite rudimentary thus far.
What I'd like to do is change the value of a combobox called Status which resides on a form called QueueForm to "In Progress" and immediately commit back to the db. The default value for the status field is "Available" so that a query can pick up the records not being worked on. When a user opens the form, the first record presented (from the query) should become "In Progress" so nobody else can get to it.

I saw something similar in another post, but it related to changing the values after a custom button on another form was selected.

Any help is appreciated.
FYI, I think part of the problem here is that I'm not yet familiar with the build events and the macro creation process outside of VBA.

Thanks in advance!

UPDATE: Got it do do what I want, however, it continues to loop or proceed. I'm guessing it's got something to do with the "Paint" action, but am not sure. Any advice?

Private Sub Detail_Paint()
Forms.queueform.Status = "In Process"
If Me.Dirty Then Me.Dirty = False
End Sub
 
Last edited:
Wow...not sure how I missed that one. Thought I looked high and low to find it... anyway, I appreciate it. Works like a charm.
 

Users who are viewing this thread

Back
Top Bottom