cuok
Programmer
- Dec 24, 2001
- 201
Hi friends.
What wrong here:
i m trying to pass a field name from table ("tipolim"
into recordset, in aim to be able to use it with the format rcd!Field=ActiveControl.value
assuming that the variable "ctl" in my strSql detremind correct and so all the query strSql here:
strSQL = "SELECT tipolim.[" & ctl.ControlSource & "], tipolim.DateTodayTipolim, tipolim.[" & ActiveControl.ControlSource & "]"
strSQL = strSQL & " FROM tipolim "
strSQL = strSQL & " WHERE tipolim.[" & ctl.ControlSource & "] = '" & ctl & "' AND tipolim.DateTodayTipolim = #" & [Forms]![frm_Tipolim_Hazana]![Tipolim_Hazana].[Form]![DateTodayTipolim] & "#"
how can i use the part "SELECT tipolim.[" & ctl.ControlSource & "], [\b]....
in code (instead of the 'xxxxxxxxxx')
Set rcd = CurrentDb.OpenRecordset(strSQL)
Do Until rcd.EOF
If rcd!xxxxxxxxxx= [Forms]![frm_Tipolim_Hazana]![Tipolim_Hazana].[Form]![DateTodayTipolim] Then....
End If
Many thanks for any help
CUOK
What wrong here:
i m trying to pass a field name from table ("tipolim"
into recordset, in aim to be able to use it with the format rcd!Field=ActiveControl.value
assuming that the variable "ctl" in my strSql detremind correct and so all the query strSql here:
strSQL = "SELECT tipolim.[" & ctl.ControlSource & "], tipolim.DateTodayTipolim, tipolim.[" & ActiveControl.ControlSource & "]"
strSQL = strSQL & " FROM tipolim "
strSQL = strSQL & " WHERE tipolim.[" & ctl.ControlSource & "] = '" & ctl & "' AND tipolim.DateTodayTipolim = #" & [Forms]![frm_Tipolim_Hazana]![Tipolim_Hazana].[Form]![DateTodayTipolim] & "#"
how can i use the part "SELECT tipolim.[" & ctl.ControlSource & "], [\b]....
in code (instead of the 'xxxxxxxxxx')
Set rcd = CurrentDb.OpenRecordset(strSQL)
Do Until rcd.EOF
If rcd!xxxxxxxxxx= [Forms]![frm_Tipolim_Hazana]![Tipolim_Hazana].[Form]![DateTodayTipolim] Then....
End If
Many thanks for any help
CUOK