Value from 2 fields

  • Thread starter Thread starter Mavis
  • Start date Start date
M

Mavis

Hi All,

I had create a drop downlist with the option of 'Others' and 'SteveDore'.
This field is link to the 'TBL3rdPartyRecovery' table, 'LiableParty'. When
the user select 'Others' the field 'ResponsibleParty' will show and user can
enter the ResponsibleParty.
I had apply the code below to let the 'ResponsibleParty' field to show when
the user select 'others':

Private Sub Form_Current()
If Me.LiableParty = "Other" Then
ResponsibleParty.Visible = True
Else
ResponsibleParty.Visible = False
End If
End Sub

Private Sub LiableParty_AfterUpdate()
If Me.LiableParty = "Other" Then
ResponsibleParty.Visible = True
Else
ResponsibleParty.Visible = False
Me.ResponsibleParty = Null
End If
End Sub


My question is how that how can i save the value of 'ResponsibleParty' into
the 'LiableParty' in 'TBL3rdPartyRecovery'?
Which mean when the user select SteveDore, 'LiableParty' will only store
SteveDore but when the user select Others, then the in 'TBL3rdPartyRecovery'
table, 'LiableParty' it will record 'Other' follow by whatever the user had
enter in the ResponsibleParty field.

Anyone can kindly advice me how to do that?
 
Hi All,

I had create a drop downlist with the option of 'Others' and 'SteveDore'.
This field is link to the 'TBL3rdPartyRecovery' table, 'LiableParty'. When
the user select 'Others' the field 'ResponsibleParty' will show and user can
enter the ResponsibleParty.
I had apply the code below to let the 'ResponsibleParty' field to show when
the user select 'others':

Private Sub Form_Current()
If Me.LiableParty = "Other" Then  
ResponsibleParty.Visible = True
Else  
ResponsibleParty.Visible = False
End If
End Sub

Private Sub LiableParty_AfterUpdate()
If Me.LiableParty = "Other" Then  
ResponsibleParty.Visible = True
Else  
ResponsibleParty.Visible = False  
Me.ResponsibleParty = Null
End If
End Sub

My question is how that how can i save the value of 'ResponsibleParty' into
the 'LiableParty' in 'TBL3rdPartyRecovery'?
Which mean when the user select SteveDore, 'LiableParty' will only store
SteveDore but when the user select Others, then the in 'TBL3rdPartyRecovery'
table, 'LiableParty' it will record 'Other' follow by whatever the user had
enter in the ResponsibleParty field.

Anyone can kindly advice me how to do that?

If you use a Combobox and set the LimitToList property to True, you
can use the OnNotInList event to handle most of this for you. If you
open up a code window, you can find help in the topic and an example
which you can modify to suit your needs.
 
Hi Hi,

Thanks for your reply.
I am very new and lousy with access. can you teach me the step to do that?
 
Back
Top