0
votes

First, let me just say I am not familiar with Access, so dumb questions, poor organization, etc. will abound. The boss kind of threw me at this project, so here I am.

I have 4 cascading combo boxes, named BilletMaterial, BilletNumber, TestType, and Axis, that filter each other based on what's selected. My next step is to use those to filter a table, which for now is just a listbox called OutTable. It has an indefinite number of fields. As far as code for trying to update the table goes, this is all I have at the moment.

If IsNull(Me.Axis) Then
    Me.FilterOn = False
Else
    Me.Filter = "OutTable = """ & Me.Axis & """"
    Me.FilterOn = True
End If

That's in the AfterUpdate event of the Axis combobox. It doesn't apppear to do anything, and I have no idea what to change or add. Any help would be great.

1
What does this mean? --> "filter a table, which for now is just a listbox"HansUp
@HansUp I wasn't sure if a listbox is the way to go with this. It's subject to change, according to advice.user3241316

1 Answers

0
votes

In your AfterUpdate statement, you need to change the record source of your OutTable control.

Me.OutTable.RowSource = "SELECT * FROM table WHERE Axis = '" & Me.Axis.Value & "'"