Using object group toggle buttons to populate another field

G

Guest

I am making toggle buttons that will correspond to comments. Once pushed, I
want the number of the button to be printed into the comment box (set as Memo
with 150 character size) so that the teachers don't have to type the number
into the Comment box. Do I need to create a VB code or is there one written
that I can use somewhere? If already built, please advise as to where to find
it.
Thanks in advance.
 
T

Troy

Actually, you should use a relationship of one-to-many. Add a new table and
call it comments. It will have field ID (autonumber); a FK to the PK of the
Table that is the rs of the existing form; and a Comments Field at a
minimum.

Now add the new table as a subform and link the Parent and Child properties
of the subform. Your report can number the comments appropriately per child
record so no one has to enter a number automatically or manually.

--
Troy

Troy Munford
Development Operations Manager
FMS, Inc.
www.fmsinc.com


I am making toggle buttons that will correspond to comments. Once pushed, I
want the number of the button to be printed into the comment box (set as
Memo
with 150 character size) so that the teachers don't have to type the number
into the Comment box. Do I need to create a VB code or is there one written
that I can use somewhere? If already built, please advise as to where to
find
it.
Thanks in advance.
 
G

Guest

It has been awhile since I have used Access. Could you please break down the
information you gave into smaller chunks and explain it more clearly. It is
taking me awhile to get myself back up to speed.
Thanks.
 
T

Troy

1. Create a new table (in Design view). Name it "tblComments" when you save
it.
2. Add 3 fields:

NAME TYPE
ID AutoNumber; Primary Key
FK_ID Number
Comments Text or Memo

Create a relationship of 1 -> Many in the relationships window. The "1"
table will be the Original Table (not this new one) and the Primary Key
field. The "Many" table will be tblComments and the FK_ID field.

Create a Form based on the Original Table. The Original Table is set as it's
datasource.
Create a Form based on the tblComments. The "tblComments" is set as it's
datasource.

On the form based on the Original Table, add a subform control, and add the
tblComments form as the Source object.
In the Link Master Field, choose the Builder (ellipses button on the right
when the cursor is placed in the property). Master field is the PK from the
Original Table, and the child is the field "FK_ID".

Now when you run the Original Table form, it will show all the details for
the child table (tblComments). Add a comment or 2 for each record to see
how it works.

Also, Northwind (the sample app that ships with MS Access) has some examples
of this in the Orders and Order Details setup for forms, relationships, etc.

--
Troy

Troy Munford
Development Operations Manager
FMS, Inc.
www.fmsinc.com


It has been awhile since I have used Access. Could you please break down the
information you gave into smaller chunks and explain it more clearly. It is
taking me awhile to get myself back up to speed.
Thanks.
 
G

Guest

Thanks for the info but I am still confused. Our school has a set of 17
premade comments that teachers use and the Comment field I want to create
would use the numbers of those comments and allow them to also put in
comments should they choose to.
In which table do I input the original comments text? Please clarify.
Thanks again for your assistance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top