shaileshak
Registered User.
- Local time
- Today, 08:17
- Joined
- Jun 27, 2002
- Messages
- 12
Hi all,
I have two subforms in a tab control.
address1 and address2.
I want to copy address1 to address2
immediately after typing the address1
by clicking a button.
Code for one field of address line
--------------------------------------------------
If Not c_address_subform![c_addrs_1] = "" Then
h_address_subform![h_addrs_1] = c_address_subform![c_addrs_1]
Else
h_address_subform![h_addrs_1] = ""
End If
--------------------------------------------------
But it gives an error
Run-time error '7878'
The data has been changed
If I try again it works.
If I click more on the same button
after editing the source address,
it shows a message window with 3 buttons
save record, copy to clip board, Drop changes
I think the problem is I need to save the record
before I copy it. I wish I could add some code at the beginning of
the On_click code for the copy button
I could add a line like
DoCmd.SaveRecord ( to save the current values
in the form to table I suppose.)
Is there any thing like this in Access ?
Could some body help me ASAP Please ?
shaileshak
I have two subforms in a tab control.
address1 and address2.
I want to copy address1 to address2
immediately after typing the address1
by clicking a button.
Code for one field of address line
--------------------------------------------------
If Not c_address_subform![c_addrs_1] = "" Then
h_address_subform![h_addrs_1] = c_address_subform![c_addrs_1]
Else
h_address_subform![h_addrs_1] = ""
End If
--------------------------------------------------
But it gives an error
Run-time error '7878'
The data has been changed
If I try again it works.
If I click more on the same button
after editing the source address,
it shows a message window with 3 buttons
save record, copy to clip board, Drop changes
I think the problem is I need to save the record
before I copy it. I wish I could add some code at the beginning of
the On_click code for the copy button
I could add a line like
DoCmd.SaveRecord ( to save the current values
in the form to table I suppose.)
Is there any thing like this in Access ?
Could some body help me ASAP Please ?
shaileshak