Hi
I have now thanks to the forum worked out why my tempvars are not working.
I have a form with two combo boxes one selects the parish, the other the church using the code
Code:
SELECT tbl_Included_Church.ChurchID, tbl_Included_Church.Church, tbl_Included_Church.fk_ParishID
FROM tbl_Included_Church
WHERE (((tbl_Included_Church.fk_ParishID)=[Forms]![frm_OpeningForm]![CboParish]));
to only show churches which are related tothat parish.
the search button uses this code
Code:
Private Sub btnSearch_Click()
TempVars.Add "varParish", Me.cboParish.Value
TempVars.Add "varChurch", Me.cboChurch.Value
DoCmd.Close
DoCmd.OpenForm FormName:="frm_Home"
End Sub
The two combo boxes have two colums, one containg the id, the other the "text Value"
so in my properties I have
column count 2
column width 0cm 3cm
I now realise the variable is being set to column 1 ie the id rather than the value
Would appreciate a fix
thanks
Ian