Inventory Update on Form

E

ecklers

Hi All-

This is probably a very easy question to answer, but I seem to be
getting stuck.

I am doing a form for inventory management. I have a select combo box
with all of my inventory items and a quantity field.

What I would like to do is to perform an update on the quantity field
on change from my select field to fetch the current quantity from the
db.

Any pointers would be much appreciated.

Thanks!
 
G

Guest

I am not clear on whether the quantity field you talk about is a column in
the combo box, or a separate control on the form.

If it is a column in your combo, the all that would be needed would be to
requery the combo in it's after update event:
Me.MyComboBoxNameHere.Requery.

If it is a separate field, then you will have to position the current record
to the selected record and the current quantity will be displayed

Private Sub MyComboBoxNameGoesHere_AfterUpdate()
Dim rst As dao.Recordset
Set rst = Me.RecordsetClone
rst.FindFirst "[MActivity] = '" & Me.MyComboBoxNameGoesHere & "'"
Me.Bookmark = rst.Bookmark
rst.Close
Set rst = Nothing

End Sub
 

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