R
richaluft
Hi!
I'm trying to use a form, frmINSURERCHANGE, to pass values to another
form. The Form, 'frmChangeInsurer', has two text box controls:
1)ClientID#
2)InsurerID#----------- where ID#'s go from 0 to n
the afterupdate event of the ClientID# field is as followsrivate Sub Client_ID__AfterUpdate()
Dim MySql As String
MySql = "SELECT DISTINCTROW tblinsurers.[InsurerID#],
tblinsurers.InsurerName "
MySql = MySql & "FROM tblINSURANCEINFO INNER JOIN tblinsurers ON
tblINSURANCEINFO.[InsurerID#] = tblinsurers.[InsurerID#]"
MySql = MySql & "WHERE (((tblINSURANCEINFO.[clientID#])=[Forms]!
[frmChangeInsurer]![clientID#]));"
Me![InsurerID#].RowSource = MySql
End SubWhile the after update event works just fine for setting the
rowsource, my problem is that after this form is opened for use, I
find that the
underlying tblInsuranceInfo is updated with a NEW inappropriate row,
in which the clientID# is present along with an InsurerID# = 0,
nomatter
what the insurerID# was on the form.
I don't understand why this is happening, and I hope that someone can
explain what I've done wrong, and how to correct.
Thanks,
richard
I'm trying to use a form, frmINSURERCHANGE, to pass values to another
form. The Form, 'frmChangeInsurer', has two text box controls:
1)ClientID#
2)InsurerID#----------- where ID#'s go from 0 to n
the afterupdate event of the ClientID# field is as followsrivate Sub Client_ID__AfterUpdate()
Dim MySql As String
MySql = "SELECT DISTINCTROW tblinsurers.[InsurerID#],
tblinsurers.InsurerName "
MySql = MySql & "FROM tblINSURANCEINFO INNER JOIN tblinsurers ON
tblINSURANCEINFO.[InsurerID#] = tblinsurers.[InsurerID#]"
MySql = MySql & "WHERE (((tblINSURANCEINFO.[clientID#])=[Forms]!
[frmChangeInsurer]![clientID#]));"
Me![InsurerID#].RowSource = MySql
End SubWhile the after update event works just fine for setting the
rowsource, my problem is that after this form is opened for use, I
find that the
underlying tblInsuranceInfo is updated with a NEW inappropriate row,
in which the clientID# is present along with an InsurerID# = 0,
nomatter
what the insurerID# was on the form.
I don't understand why this is happening, and I hope that someone can
explain what I've done wrong, and how to correct.
Thanks,
richard