Value from 2 fields

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?
 
P

Piet Linden

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.
 
M

Mavis

Hi Hi,

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top