Hello
I have created a search form by following youtube tutorials
I need to have 3 (or more) search criteria. First I have a combo box where I can chose an option and those values are displayed in a table(split form). Then I created another combo box where I want to chose a value but keep the first combo box results. I followed the tutorial and I cant determine whats wrong, both of the combo box work, but If I chose an option from one, gives me the correct results, then chose the next combo box, it resets the query. Now I do have it set to Requery as in the code below but so did the youtube tutorial
If anyone can help out I would be much appreciative.
Below is the code that I have:
Option Compare Database
'--------------------------------------------------------------------------------------------------------------------
'The code below allows one to chose a value from a combo box and only have those values displayed in the query/table
'--------------------------------------------------------------------------------------------------------------------
Private Sub cboPlanType_AfterUpdate()
Dim myPlanType As String
myPlanType = "Select * From Qry_RAU_PLAN_TOTALS where ([PLAN_TYPE_CODE] ='" & Me.CboPLANTYPE & "')"
Me.Qry_RAU_PLAN_TOTALS_subform.Form.RecordSource = myPlanType
Me.Qry_RAU_PLAN_TOTALS_subform.Form.Requery
End Sub
'The code below is set up for a combobox, one would chose a review name, and it will display those reviews
'--------------------------------------------------------------------------------------------------------------------
Private Sub cboReviewType_AfterUpdate()
Dim myReviewType As String
myReviewType = "Select * From Qry_RAU_PLAN_TOTALS where ([REVIEW_NAME] ='" & Me.cboReviewType & "')"
Me.Qry_RAU_PLAN_TOTALS_subform.Form.RecordSource = myReviewType
Me.Qry_RAU_PLAN_TOTALS_subform.Form.Requery
End Sub
__._,_.___
Posted by: pbabadie@yahoo.com
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
.
__,_._,___
Tidak ada komentar:
Posting Komentar