S
StuJol
im using access 2003 and have a form "form1" with several command buttons on.
each command button opens the same form "form2" but displaying different
records. when "form2" closes, it updates different feilds on "form1"
for example when form2 closes the following code runs in the close event
Forms!frm_PlantLog_Add.P2602A= "Offline"
i dont want to hard code P2602A, instead i want ti use a varable. i created
a varable in a module 'Public EquipmentTagString As String'
when the command button is pressed on form1 it sets EquipmentTagString as
P2602A which works ok, the problem is using the varable in the forms
property, so ive gone from
Forms!frm_PlantLog_Add.P2602A= "Offline" to
Forms!frm_PlantLog_Add.EquipmentTagString = "Offline"
which doesnt work, ive tried
Forms!frm_PlantLog_Add. & EquipmentTagString = "Offline"
also tried
"Forms!frm_PlantLog_Add." & EquipmentTagString = "Offline"
but dont work. can someone point me in the righht direction to use a varable
in a forms property.
each command button opens the same form "form2" but displaying different
records. when "form2" closes, it updates different feilds on "form1"
for example when form2 closes the following code runs in the close event
Forms!frm_PlantLog_Add.P2602A= "Offline"
i dont want to hard code P2602A, instead i want ti use a varable. i created
a varable in a module 'Public EquipmentTagString As String'
when the command button is pressed on form1 it sets EquipmentTagString as
P2602A which works ok, the problem is using the varable in the forms
property, so ive gone from
Forms!frm_PlantLog_Add.P2602A= "Offline" to
Forms!frm_PlantLog_Add.EquipmentTagString = "Offline"
which doesnt work, ive tried
Forms!frm_PlantLog_Add. & EquipmentTagString = "Offline"
also tried
"Forms!frm_PlantLog_Add." & EquipmentTagString = "Offline"
but dont work. can someone point me in the righht direction to use a varable
in a forms property.