General information
Category:
Coding, syntax & commands
Title:
Searching by two fields
Hi Im am fairly new to vfp i am working on searching the table by two fields the first field is the date the second field is the shift .iam using a table view and i am able to make it search by the first field but it wont search by the second field. any suggestions here is the code i have been using
if LOOKUP (shift_form.sr_shift_date,thisformset.Form1.SR_SHIFT_DATE1.value,;
shift_form.sr_shift_date) = thisformset.Form1.SR_SHIFT_DATE1.value
if LOOKUP(shift_form.sr_shift_time,thisformset.Form1.SR_SHIFT_TIME1.value,;
shift_form.sr_shift_time) = thisformset.Form1.SR_SHIFT_TIME1.value
thisformset.form2.SR_SWITCH_TYPE1.value = shift_form.sr_switch_type
thisformset.form2.SR_SHIFT_DATE1.value = shift_form.sr_shift_date
thisformset.form2.SR_SHIFT_TIME1.value = shift_form.sr_shift_time
thisformset.form2.tech1.value = shift_form.sr_tech1
thisformset.form2.tech2.value = shift_form.SR_tech2
thisformset.form2.tech3.value = shift_form.SR_tech3
thisformset.form2.tech4.value = shift_form.SR_tech4
thisformset.form2.tech5.value = shift_form.SR_tech5
thisformset.form2.tech6.value = shift_form.SR_tech6
thisformset.form2.action.value = shift_form.SR_action
thisformset.form2.parties_cont.value = shift_form.SR_contacted
thisformset.form2.down_time.value = shift_form.SR_down_time
thisformset.form2.trouble.value = shift_form.SR_trouble
thisformset.form2.pro.value = shift_form.SR_Procedure
thisformset.form2.misc.value = shift_form.SR_misc
thisformset.form2.training.value = shift_form.SR_training
thisformset.form2.work_per.value =shift_form.SR_wrk_perfomed
thisformset.refresh()
thisformset.Form2.show
thisformset.Form1.hide
endif
else
Messagebox("No Records That Match,Enter New Record or Exit",48,"Message")
Thisformset.Form1.SR_SHIFT_DATE1.setfocus
endif
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only