Makin some sort of an update query

  • Thread starter matt donker via AccessMonster.com
  • Start date
M

matt donker via AccessMonster.com

Not positive if what i want to do is even possible or if it is in what way
to do it.

Okay i have a table with tons of information of fixtures including two
fields called Parts used for and fixture#.

What i want to do is have a form with two list boxes. One contains part
numbers and the other contains fixture numbers but only different numbers
on each case.

Now i want the user to be able to go in and pick from either box and when
the user does this it will automatically change the data in the other box
to match what is available.

As in someone selects a part number in the first listbox and this then
updates the second list box to only fixtures which are used for that part
number. Or vice versa someone selects a fixture number and this updates
the partnumber list box to only part numbers that the fixture number is
used for.

Is this possible?

And if so how?

Thanks Matt
 
M

matt donker via AccessMonster.com

Nice to know the guy who posted after me got 18 replies while i can't even
get one. Jeez people was my question to hard or something?
 
R

Rick B

Answered in your later post.

Please search for your answers in the future if your issue is so urgent.

Rick B
 
M

Michel Walsh

Hi,

Having two, or 10 combo box to synch is the same problem than having just
one, but repeated twice, or ten times.

To synch the list of a, one, combo box to the data from another control, you
can use the GotFocus event of the combo box (if the combo is not in focus,
it is unlikely its list box would be visible).


================
Dim str as string

If Not IsNull(FORMS!FormName!ControlName) Then
str="SELECT ... FROM ... WHERE fieldName=FORMS!FormName!ControlName"
Else
str=Me.ComboBoxName.RowSource
End If

If Me.ComboBoxName.RowSource <> str then
Me.ComboBoxName.RowSource = str
End If
================


Hoping it may help,
Vanderghast, Access MVP
 

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