T
Toco Hara
I have error in SQL expression when when my form opens. I
think problem is I have a composite key. The PK is
CustomerNum and DtOrder. I try to concatinate the PK, but
I don't think my syntax is correct. Here is my strSQL:
Dim strSQL As String, strCustID as String, strDtOrder As
String,
strCustID = Forms!frmCustomerData.CustomerID
strDtOrder = Forms!frmCustomerData.DtOrder
strSQL = "SELECT CallDt,CallTime,Disposition FROM
tblOrderHistory WHERE "
strSQL = strSQL & "CustomerID='" & strCustomerID & "' And
DtOrder='" & "#" & DtOrder & "#" & "'"
strSQL = strSQL & "' ORDER BY CallDt ASC,CallTime ASC,
Disposition ASC;"
Set rsOne = CurrentDb.OpenRecordset(strSQL, dbOpenSnapshot)
Can someone show me my error? I can not concatinate the
PK because it is a composite key. Thank you
Toco
think problem is I have a composite key. The PK is
CustomerNum and DtOrder. I try to concatinate the PK, but
I don't think my syntax is correct. Here is my strSQL:
Dim strSQL As String, strCustID as String, strDtOrder As
String,
strCustID = Forms!frmCustomerData.CustomerID
strDtOrder = Forms!frmCustomerData.DtOrder
strSQL = "SELECT CallDt,CallTime,Disposition FROM
tblOrderHistory WHERE "
strSQL = strSQL & "CustomerID='" & strCustomerID & "' And
DtOrder='" & "#" & DtOrder & "#" & "'"
strSQL = strSQL & "' ORDER BY CallDt ASC,CallTime ASC,
Disposition ASC;"
Set rsOne = CurrentDb.OpenRecordset(strSQL, dbOpenSnapshot)
Can someone show me my error? I can not concatinate the
PK because it is a composite key. Thank you
Toco