Minggu, 22 April 2012

RE: [MS_AccessPros] Re: Fixing a default value for a table.

 

Robin-

If you want to set the MeetingID in tRegistrants for the "next" meeting via a
combo box, you need a Row Source that lists all the meetings. Don't you have a
tMeetings? When the user does this, won't there already be a row in tMeetings
for the "next" meeting? I'm not sure I understand why you need a next meeting
table. If the "next" meeting isn't already in tMeetings, won't you get a RI
error if you try to add a row to tRegistrants containing a MeetingID that
doesn't exist? If RI isn't a problem, then the UNION query using tMeetings and
tNextMeeting should provide a list of all the MeetingID values, including the
value for the "next" one.

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

----------------------------------------

From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Robin Chapple
Sent: Sunday, April 22, 2012 8:46 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: RE: [MS_AccessPros] Re: Fixing a default value for a table.

 

Thanks John,

Please excuse my continued ignorance. As I understand it a UNION
query needs identical field names to operate. "tNextMeeting' has only
two fields.

This project is a continuation of my web based data and a combo box
is not an option.

Regards,

Robin Chapple

At 22/04/2012 03:55 PM, you wrote:
>Robin-
>
>If you want the "next" meeting to show up in a combo box for MeetingID, use a
>UNION query that pulls the MeetingID from your Meetings table and
>the MeetingID
>from tNextMeeting as the Row Source.
>
>
>John Viescas, author
>Microsoft Office Access 2010 Inside Out
>Microsoft Office Access 2007 Inside Out
>Building Microsoft Access Applications
>Microsoft Office Access 2003 Inside Out
>SQL Queries for Mere Mortals
>http://www.viescas.com/
>(Villefranche-sur-mer, France)
>
>------------------------------------
>
>From: MS_Access_Professionals@yahoogroups.com
>[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Duane
>Sent: Sunday, April 22, 2012 6:01 AM
>To: MS_Access_Professionals@yahoogroups.com
>Subject: [MS_AccessPros] Re: Fixing a default value for a table.
>
>
>Robin,
>What are you wanting to do with the results of the query? I expect you need to
>remove the JOIN if you want to return any records.
>
>Duane Hookom
>MS Access MVP
>
>--- In MS_Access_Professionals@yahoogroups.com, Robin Chapple <robinski@...>
>wrote:
> >
> >
> > Using Access 2007 with Windows7.
> >
> > I have a registration table for meetings and a separate table for the
> > secretary to determine the "Next Meeting" it has only one record.
> >
> > I need "tNextMeeting" table to use the field "MeetingID" from the
> > "tNextMeeting" table. This SQL does not work.
> >
> > SELECT tNextMeeting.MeetingID, tRegistrants.ClubID,
> > tRegistrants.MemberID, tRegistrants.ChoiceID,
> > tRegistrants.RegistrantID, tRegistrants.PostHolderID,
> tRegistrants.LastUpdated
> > FROM tRegistrants INNER JOIN tNextMeeting ON tRegistrants.MeetingID =
> > tNextMeeting.MeetingID
> > ORDER BY tRegistrants.ClubID;
> >
> > I have also tried to make the default value of "MeetingID" in the
> > "tRegistrants" table as [tNextMeeting].[MeetingID] which shows the
> > error message could not find the field 'tNextMeeting].[MeetingID'
> >
> > Is my plan possible?
> >
> > Many thanks,
> >
> > Robin Chapple
> >
>
>
>
>
>------------------------------------
>
>Yahoo! Groups Links
>
>
>

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar