I'm trying to get a value from a pass thru query into a form. Below is an example:
Unfortunately the value of Item2 doesn't get passed. The weird thing is that I'm able to vie the Pass Thru query. Any suggestions? Thanks!
Code:
Set qdfEXAMPLE= dbCurrent.CreateQueryDef("PT:TEST")
qdfEXAMPLE.Name = "PT:TEST"
qdfEXAMPLE.Connect = "ODBC;DSN=DSN_NAME"
qdfEXAMPLE.ReturnsRecords = True
qdfEXAMPLE.SQL = "SELECT ITEM1, ITEM2, ITEM3, ITEM4 " _
& "WHERE ITEM1 = '" & [Forms]![FRM_Main]![TEXT1] & "'"
Dim txtHere as string
txtHere = ITEM2
Unfortunately the value of Item2 doesn't get passed. The weird thing is that I'm able to vie the Pass Thru query. Any suggestions? Thanks!