What to do when you open the form and How to Handle Record Navigat

I

Israel

I have two tables: [Master Table] and [Option: Axle Upgrade]

My first two combo boxes [Axle Type] and [Axle Brake Style] come from
[Option: Axle Upgrade] and they are both unbound. My third combo box [Axle
Size Option] comes from the [Master Table] and is bound to a field with in
the table.

With the three combo boxes the first two combo boxes narrows the amount of
records down for the third combo box selection by categorization. My problem
is that when I load the form my records show that I have not selected any
options. If I set my options with the form open and go record to record the
combo boxes stay filled but once I close the form I am back to the same
thing. I have been working with an example from Office Online; the name is
Basing one combo box on another. There are sections in the example about how
to handle a form load and record navigation; as seen below I have been
working with the example to find the answer but it doesn’t seem to work the
way that I had hoped. I am fairly new to access and do not really understand
the visual basic coding real well. If I could get some pointers that would
help me I would be grateful.

The code is most likely messy and not well done; but so far I have pick
parts from the example that have seem to work for me. The last part is the
one that I am having problems with.


The following is all the code that I have enter while in Visual basic:

Option Compare Database

Private Sub Axle_Type_AfterUpdate()
Me.Axle_Size_Option.Requery
End Sub

Private Sub Axle_Brake_Style_AfterUpdate()
Me.Axle_Size_Option.Requery
End Sub

Private Sub Form_Current()
Me.Axle_Size_Option.Requery
End Sub

Private Sub Form_Load()
If IsNull(Axle_Size_Option) Then
Axle_Size_Option = Me.Axle_Size_Option.ItemData(0)
Call Axle_Brake_Style_AfterUpdate
End If

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