Hello, I am working in MSAccess 2003 and am creating a database for physicians to enter patient data. My first form contains general patient info. From the Patient Information form, you click a button that opens the Patient Follow Up form which allows the physician to enter followup data on how the patient responded to treatment. The Patient Follow Up form displays the Patient ID number (carried through from the Patient Info form) and then a combo box where you select the available Follow Up Date (patients have multiple follow up visits).
My problem: When I click the button to go to Patient FollowUp the form displays the data for the correct Patient BEFORE I select a Follow Up from the Combo box. I don't want the form to populate with any data (other than patient ID) until the physician selects the appropriate follow up date.
Based on a related thread in this message board from Corticus, I made the Patient Follow Up form based on a qyr (not a table) and then tried to add code to the FollowUpDateSelected combo box:
_________________________________
FollowUpDateSelected_afterupdate()
If Not Isnull(FollowUpDateSelected) Then
If Me.Dirty then Me.Dirty = False
End if
Me.Requery
End Sub
________________________
I also tried:
___________________________
FollowUpDateSelcted_Afterupdate()
If Me.Dirty = True then Me.Dirty = False
Forms.frmPatientFollowUp.FollowUpDatSelected.requery
end sub
_______________________
In both instances, when I clicked from the Patient Info to the Patient FollowUp form, the form was completely blank and I lost the Patient ID link from Patient Info. Consequently, when I change the Patient Follow Up form data source back to the tblFollowUP, the form opens as it was before. I also tried messing with a "Filter" property but that doesn't seem to work as it requires the FollowUp date be entered before my form opens.
This message board has been so helpful. I really appreciate suggestions anyone has. Thank you!
My problem: When I click the button to go to Patient FollowUp the form displays the data for the correct Patient BEFORE I select a Follow Up from the Combo box. I don't want the form to populate with any data (other than patient ID) until the physician selects the appropriate follow up date.
Based on a related thread in this message board from Corticus, I made the Patient Follow Up form based on a qyr (not a table) and then tried to add code to the FollowUpDateSelected combo box:
_________________________________
FollowUpDateSelected_afterupdate()
If Not Isnull(FollowUpDateSelected) Then
If Me.Dirty then Me.Dirty = False
End if
Me.Requery
End Sub
________________________
I also tried:
___________________________
FollowUpDateSelcted_Afterupdate()
If Me.Dirty = True then Me.Dirty = False
Forms.frmPatientFollowUp.FollowUpDatSelected.requery
end sub
_______________________
In both instances, when I clicked from the Patient Info to the Patient FollowUp form, the form was completely blank and I lost the Patient ID link from Patient Info. Consequently, when I change the Patient Follow Up form data source back to the tblFollowUP, the form opens as it was before. I also tried messing with a "Filter" property but that doesn't seem to work as it requires the FollowUp date be entered before my form opens.
This message board has been so helpful. I really appreciate suggestions anyone has. Thank you!