runtime error 7874

kiss.shoremishra

Registered User.
Local time
Tomorrow, 03:07
Joined
Feb 4, 2017
Messages
19
Hi All,

Thanks for the login. Feeling nice to be part of Access Experts.

I am just trying to fetch values in a combobox based on selection done by user in another combobox.
I am trying to pass the value using a query but getting run time error 7874. Below is the code that I have written. Please assist.

Private Sub Combo6_AfterUpdate()
Dim mcdtype As String

mcdtype = Me.Combo6.Value

T = "SELECT [Tbl - WRIN].[Product Group] FROM [Tbl - WRIN] WHERE ([Tbl - WRIN].[McDs Type]) = '" & mcdtype & "' ORDER BY [Tbl - WRIN].[Product Group];"
'T = "INSERT INTO Data1 Values (" & ODI & ", '" & Nam & "', " & Qty & "," & Price & ");"


DoCmd.OpenQuery T

End Sub
 
Welcome! You say you are trying to get the values into a second combo box? If so try:

Me.SecondComboName.RowSource = T
 
Welcome! You say you are trying to get the values into a second combo box? If so try:

Me.SecondComboName.RowSource = T

Thanks a ton, Its working. Appreciate your quick response. Thanks again and again.
 

Users who are viewing this thread

Back
Top Bottom