I have the contactID in the studies table as just a number and it is linked to a contact table that has the autonumber on that one.
It's a one (Contact) to many (Studies) relationship. I have it set to Enforce Ref. Integrity and Cascade Updates. Should I have it cascade deleted records?
Toby Bierly <[EMAIL PROTECTED]> wrote:
Toby Bierly <[EMAIL PROTECTED]> wrote:
You should be storing the ContactID in the Studies table. All you need to
do is use the form wizard to create the form based on the Studies table, or
a query of that table.
Then, in design mode, change the ContactID text field on the newly created
form to a ComboBox (Right-click on the TextBox, Change To-->ComboBox). You
will want the following settings in the properties for the ComboBox:
On the Data Tab:
Control Source: ContactID (this should already be set by the form wizard)
Row Source Type: Table/Query
Row Source: Click on the ... on the right and query for the ContactID and
FirstName - LastName1 (two fields) from the Contacts table
Bound Column: Leave it at 1 (the ContactID field)
On the Format Tab:
Column Count: 2
Column Widths: 0";2.5" (this makes the first column invisible; you can
play with the second value as needed)
This will allow the user to simply choose a name from the combobox and the
ContactID will be inserted into the Studies table.
HTH,
Toby
----- Original Message -----
From: "Joe" <[EMAIL PROTECTED]>
To: <AccessDevelopers@yahoogroups.com>
Sent: Monday, December 05, 2005 1:59 PM
Subject: [AccessDevelopers] Re: Drop Down to Select Contact
> The thing with this is I don't want them to be able to edit the
> contact info just select from a drop down. Then all that contact
> info is associated to the study. So do a combine of the First name -
> Last name and have that as a drop down that is linked to the
> contacts. I will have a seperate form to enter in contact info.
> Can I still do that the way you ar talking about Alienwebmaster?
>
>
> --- In AccessDevelopers@yahoogroups.com, "Richard" <[EMAIL PROTECTED]>
> wrote:
> >
> > It sounds like you already have the relationships developed. Use
> the
> > FORM WIZARD in the forms tab of the main DB window, and select
> fields
> > from BOTH TABLES that you want to see. The wizard does a very
> nice job
> > of creating a main form (with the contact information) and a sub
> form
> > (with the studies info). Hope this helps!
> >
> > Alienwebmaster
> >
> >
> > --- In AccessDevelopers@yahoogroups.com, "Joe" <[EMAIL PROTECTED]>
> > wrote:
> > >
> > > I am sorry this is probabally a newbie question. I have two
> tables a
> > > contact table and a study table. I set up my form to view Study
> > > details information. I have a relationship of a One (Contact)
> to
> > Many
> > > (Studies) I want to have a drop down so I can select one
> Contact and
> > > associate this to a study. How would I go about doing this?
> > >
> > > Thanks in advance
> > >
> >
>
>
>
>
>
>
>
>
>
> Please zip all files prior to uploading to Files section.
> Yahoo! Groups Links
>
>
>
>
>
>
Yahoo! Personals
Let fate take it's course directly to your email.
See who's waiting for you Yahoo! Personals
Please zip all files prior to uploading to Files section.
SPONSORED LINKS
Microsoft access developer | Microsoft access help | Microsoft access database |
Microsoft access training | Microsoft access training course | Microsoft access programming |
YAHOO! GROUPS LINKS
- Visit your group "AccessDevelopers" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.