Hi all
bit of a newbie with access, working on my project for college at the
moment, and need some help with one of my forms.
I have one main form (called Course)
it has a subform inside.(CentreSmall)
The main form has a field called "CentreID"
The subform has all the Centre's in the entire system (including Centre
ID's), they are not related at the moment.
As part of the centre's subform, I added a button called Copy
(command7) to all of the records.
I need some Code which I can add to the button which will copy the data
from the CentreID inside the subform, into the CentreID on the main
form.
I dont know how to go about this and im no VBA coder
any help would be nice, thanks :D
albycindy - 28 Nov 2005 12:00 GMT
Have you tried using the Default Value in the Properties box of your target
text fields?
..tiny idea from a tiny brain...no match for access whizzes that normally
frequent this page....
> Hi all
>
[quoted text clipped - 19 lines]
>
> any help would be nice, thanks :D
BruceM - 28 Nov 2005 14:12 GMT
Tables have fields, and forms have controls that can be bound to the fields.
I will assume for now that when you refer to a form or subform you are
really referring to its record source table. Is your main form based on a
Course table, and your subform on a CentreSmall table? If so, what does the
Course table contain other than CentreID. You will need to clarify what you
mean by "The subform has all the Centre's in the entire system". If you
need the records in the two tables to be related to each other, you do so by
setting up the table relationships, not by copying the ID from one table to
the other. If the relationships are properly set up, and if the main form
and subform are based on the related tables, records in CentreSmall will
automatically contain a CentreID value that matches CentreID from the
corresponding record in the Course table.
> Hi all
>
[quoted text clipped - 19 lines]
>
> any help would be nice, thanks :D