Hello,
I'm passing a control into a function because i will need to run this function many times over. i can access the name of the control quite easily, the name of the control is the same name of a field in a table. See Below :
__________________________________________________________
Function ClearActivityFromProgramme(ctl As Control)
Dim TimeSlot As Variant
TimeSlot = ctl.Name
ctl.value = ""
rstprogramme!TimeSlot = 0
End Function
__________________________________________________________
Problem is that this statement 'rstprogramme!TimeSlot = 0' makes the computer think that i'm trying to access a field called Timeslot, i'm actually trying to access a field whos name is stored within the variable Timeslot, is there a way i can deferentiate between the two ?
thanks
I'm passing a control into a function because i will need to run this function many times over. i can access the name of the control quite easily, the name of the control is the same name of a field in a table. See Below :
__________________________________________________________
Function ClearActivityFromProgramme(ctl As Control)
Dim TimeSlot As Variant
TimeSlot = ctl.Name
ctl.value = ""
rstprogramme!TimeSlot = 0
End Function
__________________________________________________________
Problem is that this statement 'rstprogramme!TimeSlot = 0' makes the computer think that i'm trying to access a field called Timeslot, i'm actually trying to access a field whos name is stored within the variable Timeslot, is there a way i can deferentiate between the two ?
thanks