updating records in a form

stevie1969

Registered User.
Local time
Yesterday, 22:21
Joined
Mar 10, 2006
Messages
22
I have been struggling with this for weeks now and it must be fairly simple.

I have a form linked to a table with the fields

number
road
town

and

partnernumber
partnerroad
partnertown

I input the first 3 fields and I would like to be able to click a command button and copy those 3 fields to the last 3 fields to save extra typing. I cannot get the command to work though.

any help appreciated

thanks
 
Quick stab at it:

me!partnernumber = me!number
 
thanks

I get the message ' can't find macro'

so not working i'm afraid
 
no

got it to work now

but only for the first command

do i just type line after line of the commands then each after the other?
 
still have a problem

one of my fields is called partner road

when i enter me!partner_road I get a run time error 2465 cannot find field
 
Hi I'm new to this but I did read somewhere that VB does not handle spaces in field names. You could try renaming field name not to include space.
 
Hi stevie1969,

When you have a space in your field names enclose it with parenthises.

Eg, partner road becomes [partner road], so your code below would read

Code:
me.[partner road]

I hope this helps.

Robert88
 

Users who are viewing this thread

Back
Top Bottom