J
jeremy0028
I have a main form called frm people which has a command button called
add charges which has the following code
Private Sub Add_Charge_Click()
On Error GoTo Err_Add_Charge_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmCharges"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Add_Charge_Click:
Exit Sub
Err_Add_Charge_Click:
MsgBox Err.Description
Resume Exit_Add_Charge_Click
End Sub
When pressed opens a form called frmcharges. in the form i have 2
combo boxs
1st is called personID which has the following
SELECT [tblPeople].[PersonID], [tblPeople].[LastName]&", "&
[tblPeople].[FirstName]&" "& [tblPeople].[MiddleName] FROM
[tblPeople];
In the after update event of the combo box i have a macro named Macro1
in the macro has a requery event to the billedTo combo box
The default value has the following =[Forms]![frmPeople]![txtPersonID]
The second combo box is BilledTo which displays the insurance name of
the patient.
SELECT tblPeopleInsurance.GuaranterID, tblPeopleInsurance.PersonID,
tblPeopleInsurance.InsuranceName
FROM tblPeopleInsurance
WHERE (((tblPeopleInsurance.PersonID)=[tblCharges].[PersonID]));
This works fine however i always have to select the name from the
personid comb box in the frmcharge before the BilledTo combo box
updates with the patients Insurance.
What I want to do is have the BilledTo automatically update when i
select add charge command button from the frm called frmPeople.
Is there any possiblities.
Thanks in advance.
add charges which has the following code
Private Sub Add_Charge_Click()
On Error GoTo Err_Add_Charge_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmCharges"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Add_Charge_Click:
Exit Sub
Err_Add_Charge_Click:
MsgBox Err.Description
Resume Exit_Add_Charge_Click
End Sub
When pressed opens a form called frmcharges. in the form i have 2
combo boxs
1st is called personID which has the following
SELECT [tblPeople].[PersonID], [tblPeople].[LastName]&", "&
[tblPeople].[FirstName]&" "& [tblPeople].[MiddleName] FROM
[tblPeople];
In the after update event of the combo box i have a macro named Macro1
in the macro has a requery event to the billedTo combo box
The default value has the following =[Forms]![frmPeople]![txtPersonID]
The second combo box is BilledTo which displays the insurance name of
the patient.
SELECT tblPeopleInsurance.GuaranterID, tblPeopleInsurance.PersonID,
tblPeopleInsurance.InsuranceName
FROM tblPeopleInsurance
WHERE (((tblPeopleInsurance.PersonID)=[tblCharges].[PersonID]));
This works fine however i always have to select the name from the
personid comb box in the frmcharge before the BilledTo combo box
updates with the patients Insurance.
What I want to do is have the BilledTo automatically update when i
select add charge command button from the frm called frmPeople.
Is there any possiblities.
Thanks in advance.