Jump to content
  • Advertisement
Sign in to follow this  
drjulio2002

I'll need help with office access 2003 programming.

This topic is 5019 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm having a problem with Microsoft Office Access 2003 Programming, everytime I select Combo Box a pop up window asking for a value parameter for that table too get the value specific. I want to get rid-off that value parameter pop-up window. Can somebody help me? Please!
Option Compare Database
Option Explicit

Private Const strSQL1 = "SELECT Size, Shape, Material " & _
    "FROM qryCombo1 Where Size = '"
Private Const strSQL2 = "' AND Shape = "
Private strSQL As String

Private Const strMsg1 = "Select a Size from the list"
Private Const strMsg2 = "Select a Shape from the list"

Private Sub FillList()
strSQL = strSQL1 & Me!cboSize.Value & _
    strSQL2 & Me!cboShape.Value
Me!lstOrders.RowSource = strSQL
Me!lstOrders.Requery
Me!lblList.Caption = "Orders from " & _
Me!cboSize.Value & " for " & _
Me!cboShape.Column(1)
If Me!lstOrders.ListCount = 0 Then
    Me!lblList.Caption = "No " & Me!lblList.Caption
End If
End Sub

Private Sub cboSize_AfterUpdate()
If Me!cboShape.Value <> "" Then
    Call FillList
Else
    Me!lblList.Caption = strMsg1
End If
End Sub

Private Sub cboShape_AfterUpdate()
If Me!cboSize.Value > 0 Then
    Call FillList
Else
    Me!lblList.Caption = strMsg2
End If
End Sub

Private Sub Form_Activate()
If Me!cboSize.Value > 0 And Me!cboShape.Value <> "" Then
    Call FillList
Else
    Me!lblList.Caption = strMsg2
End If
End Sub

Thank you!

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!