Thank you again very much for confirming that code.
I have done as you said, but am now getting an error message "Microsoft
Access can't find the macro 'me'." when I click the button to try to execute
the operation. I'm using Access97 btw ...
Thank you very much
Andy
e-mail:
andy@airnorth.demon.co.uk
"DFS" <nospamDS@nospam.com> wrote in message
news:vsvekr25p0gr43@corp.supernews.com...[color=blue]
> "Andy Hutchings" <andy@airnorth.demon.co.uk> wrote in message
> news:bqobpq$jqu$1$8300dec7@news.demon.co.uk...[color=green]
> > Thanks very much for the prompt reply - I have tried it, but I don't[/color][/color]
think[color=blue][color=green]
> > I'm writing the code correctly.
> >
> > I'm not sure what 'me' is ..... could you re-write the code with my db[/color]
> names[color=green]
> > etc. in their correct place, as per the following names please.
> >
> > Database name = Civil
> > Form name = Changes (same name as underlying table)
> > sub-form name = bbH (same name as underlying table)
> > Field name in Changes = NAME
> > Field name in bbH = OWNER
> >
> > I want the field NAME in Changes to be written to the field OWNER in bbH[/color]
>
> Andy, for purposes of this particular line of code:
>
> database name = Civil = not important
> Form name = Changes = not important
> sub-form name = bbH = important
> Me = reference to form executing the code = imporant
> Field name in Changes = NAME = important
> Field name in bbH = OWNER = important
>
>
> On form "Changes", add a click button and this code to it:
>
> me.bbH.Form.OWNER = me.[NAME]
>
> (note: I put Name in brackets because it's a common property of Access
> objects. In general you shouldn't use NAME as a field name).
>
>
>
>
>
>[color=green]
> > Sorry if I'm totally thick, and thanks again
> >
> > Andy
> >
> > "DFS" <nospamDS@nospam.com> wrote in message
> > news:vsvads1hq4dq6e@corp.supernews.com...[color=darkred]
> > > Andy,
> > >
> > > Put the main form in design mode, drop a command button on it, and add[/color]
> > some[color=darkred]
> > > code like this to the button's OnClick property (it will copy from the[/color]
> > main[color=darkred]
> > > form to the subform):
> > >
> > > me.subFormName.Form.Field1Name = me.Field1Name
> > > me.subFormName.Form.Field2Name = me.Field2Name
> > > ...
> > >
> > >
> > >
> > > "Andy Hutchings" <andy@airnorth.demon.co.uk> wrote in message
> > > news:bqo8ms$lre$1$8302bc10@news.demon.co.uk...
> > > > Hi everybody - hope you can help out here.
> > > >
> > > > I have a form in a database, which is a columnar form from one of[/color][/color][/color]
the[color=blue][color=green][color=darkred]
> > > tables
> > > > in the db - there is a sub-form to the form which is a datasheet[/color][/color][/color]
view[color=blue]
> of[color=green][color=darkred]
> > > > another table in the db. The LinkChilds property is set to show[/color]
> > connected[color=darkred]
> > > > records from both tables.
> > > >
> > > > What I'd like to do is copy and paste, or use some other method of
> > > writing,
> > > > the contents of one field in one table in the form, to a field in[/color][/color][/color]
the[color=blue][color=green][color=darkred]
> > > table
> > > > in the sub-form, preferably with a button on the form which will[/color][/color][/color]
copy[color=blue][color=green]
> > the[color=darkred]
> > > > data without having to manually copy and paste from field to field.
> > > >
> > > > Is this sort of thing possible ?, and could anybody maybe point me[/color][/color][/color]
in[color=blue][color=green]
> > the[color=darkred]
> > > > right direction as to how it might be done.
> > > >
> > > > Cheers, and thanks in advance.
> > > >
> > > > Andy
> > > >
> > > > A N D R E W H U T C H I N G S , N E W C A S T L E UK
> > > > e-mail:
andy@airnorth.demon.co.uk
> > > >
> > > >
> > > >
> > > > ---
> > > > Outgoing mail is certified Virus Free.
> > > > Checked by AVG anti-virus system (
http://www.grisoft.com).
> > > > Version: 6.0.545 / Virus Database: 339 - Release Date: 27/11/2003
> > > >
> > > >
> > >
> > >[/color]
> >
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (
http://www.grisoft.com).
> > Version: 6.0.545 / Virus Database: 339 - Release Date: 27/11/2003
> >
> >[/color]
>
>[/color]
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.545 / Virus Database: 339 - Release Date: 27/11/2003