I have recently upsized the back end of my app from Access 97 to MSSQL Server 6.5. One DataControl originally has the following statement:
Data1.RecordSource="SELECT * FROM Staff WHERE StaffID='" & txtStaffID.Text & "'"
However, it does not work with MSSQL Server 6.5 since it goes thru the ODBC layer. I read from "Help" and know that I can set the RecordSource = QueryDef.some_kind_of_property
to pass the SQL statement and then do the Refresh. But how??? Can anyone give me an example???