sql = “SELECT X.ID, X.Contact_ID, X.Card_Year, X.Card_Sent, X.Card_Received, X.Notes, C.ID, C.Last_Name, C.First_Name FROM XmasCardYear X, Contacts C”+_
" WHERE X.ID = ’ “+ me.Cell(me.ListIndex,0) +” ’ AND X.Contact_ID = C.ID"
fldCardID.Text = rs.Field(“ID”).StringValue //this does not work because we have 2 ID fields in the select stmt
fldCardID.Text = me.cell(me.ListIndex,0)
I am selecting a row of data from a list box which is loaded from SQLite Database to display in a detail area with field data from the selection. As can be seen from the sql select statement I am retrieving the ID field from 2 different tables. I need to load the X.ID into a invisible field on the detail form. If I assign the value of “ID” I don’t get the correct table ID. I have a work around using the listbox index, but I was curious as to how to use the rs.field to get the correct table.
I tried rs.field (x.ID) and rs.field (“x.ID”), but that does not compute.
Thanks for any help.