Run-time error '7878'

shaileshak

Registered User.
Local time
Today, 13:15
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
 
Two copies of the same address:

correspondence address and home address may the
same in some cases. By copying the address the user
can save time.

(Communication is normally posted to the correspondence
address but some times important documents are sent to
the home address. Hence both address may be useful in different occasions)

Many thanks Rich.

shaileshak
PS. I always thought MS Access is only for beginners and not that useful for
professional solutions. After starting a project (for a REAL client)
I realised that I was wrong and this forum proved me that
lots of people out there consider MS Access very seriously.
Thanks to all.
 
I really need some help with this problem
please..


shaileshak
 
The code to save a record is:-

DoCmd.RunCommand acCmdSaveRecord
 
Hi,

I am really sorry to say that I added the
line before the code to copy the address but
it didn't work.

I searched the net for Run-time error '7878'
again I could not find any match :(

please help. pleeeeeeeeeeeeeease.....

Shailesh
 

Users who are viewing this thread

Back
Top Bottom