kyprogrammer
Registered User.
- Local time
- Today, 02:31
- Joined
- Oct 5, 2016
- Messages
- 14
So in a nutshell my brain is fried. I need help I am getting a too few parameters error when my set rs = db.OpenRecordset(mySQL) is compiled
Here is the mySQL variable
mySQL = "SELECT ASSY_QC_Check_Info.ID, ASSY_QC_Check_Info.Part_ID, ASSY_QC_Check_Info.Check_Point, ASSY_QC_Check_Info.Check_Type, ASSY_QC_Check_Info.Min, ASSY_QC_Check_Info.Max, " _
& "ASSY_QC_Check_Info.Desc_Area, ASSY_QC_Check_Info.Temp_Part_ID " _
& "FROM ASSY_QC_Check_Info " _
& "WHERE (((ASSY_QC_Check_Info.Part_ID)=[Forms]![QC_ASSY_Check_Main_frm]![txt_PartID]));"
I know the issue is because of what comes after the WHERE statement. However, the Part_ID is what filters down the recordset. When I create a query in the access database and paste the SQL code it does what it's supposed to. I am trying to do this programmically so it will auto populate a series of textboxes with the data.
TIA
J
Here is the mySQL variable
mySQL = "SELECT ASSY_QC_Check_Info.ID, ASSY_QC_Check_Info.Part_ID, ASSY_QC_Check_Info.Check_Point, ASSY_QC_Check_Info.Check_Type, ASSY_QC_Check_Info.Min, ASSY_QC_Check_Info.Max, " _
& "ASSY_QC_Check_Info.Desc_Area, ASSY_QC_Check_Info.Temp_Part_ID " _
& "FROM ASSY_QC_Check_Info " _
& "WHERE (((ASSY_QC_Check_Info.Part_ID)=[Forms]![QC_ASSY_Check_Main_frm]![txt_PartID]));"
I know the issue is because of what comes after the WHERE statement. However, the Part_ID is what filters down the recordset. When I create a query in the access database and paste the SQL code it does what it's supposed to. I am trying to do this programmically so it will auto populate a series of textboxes with the data.
TIA
J