PC Review


Reply
Thread Tools Rate Thread

Control Button to Create a New Record in Another Form

 
 
=?Utf-8?B?bnl0d29kZWVz?=
Guest
Posts: n/a
 
      30th Oct 2007
I've developed a MS Access application for Trade Shows. One of my tables
contains all basic client info. This table is used as the data source for
both a complete client form and a partial data form. Both forms can show all
clients (individually). Using the partial data form I want to create a
button that copies the current record and creates a new record in a form
titled Trade Show Attendees. Other data in the Trade Show Attendees must be
entered to complete that attendee's record. Some of the data entered will
populate the TradeShow Attendees table.

Can anyone describe to me how I might accomplish the above by using a
control button?
 
Reply With Quote
 
 
 
 
ruralguy via AccessMonster.com
Guest
Posts: n/a
 
      30th Oct 2007
All you should need to pass is the ClientID to the next form which can be
passed in the OpenArgs argument. The next form should be based on a query
that joins the Attendees table with the Client table on the ID field. Other
than Foreign Keys, data should not be duplicated in a Relational Database.

nytwodees wrote:
>I've developed a MS Access application for Trade Shows. One of my tables
>contains all basic client info. This table is used as the data source for
>both a complete client form and a partial data form. Both forms can show all
>clients (individually). Using the partial data form I want to create a
>button that copies the current record and creates a new record in a form
>titled Trade Show Attendees. Other data in the Trade Show Attendees must be
>entered to complete that attendee's record. Some of the data entered will
>populate the TradeShow Attendees table.
>
>Can anyone describe to me how I might accomplish the above by using a
>control button?


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via http://www.accessmonster.com

 
Reply With Quote
 
=?Utf-8?B?bnl0d29kZWVz?=
Guest
Posts: n/a
 
      30th Oct 2007
Thanks for your reply!

I created a query which linked the ClientIDs of the 2 tables (as per your
suggestion). I then created a form populated by fields from the query. For
some reason, when I try to view the form, all I see is a blank form with
neither labels nor fields. I do not understand what's causing this problem.
Any ideas?



"ruralguy via AccessMonster.com" wrote:

> All you should need to pass is the ClientID to the next form which can be
> passed in the OpenArgs argument. The next form should be based on a query
> that joins the Attendees table with the Client table on the ID field. Other
> than Foreign Keys, data should not be duplicated in a Relational Database.
>
> nytwodees wrote:
> >I've developed a MS Access application for Trade Shows. One of my tables
> >contains all basic client info. This table is used as the data source for
> >both a complete client form and a partial data form. Both forms can show all
> >clients (individually). Using the partial data form I want to create a
> >button that copies the current record and creates a new record in a form
> >titled Trade Show Attendees. Other data in the Trade Show Attendees must be
> >entered to complete that attendee's record. Some of the data entered will
> >populate the TradeShow Attendees table.
> >
> >Can anyone describe to me how I might accomplish the above by using a
> >control button?

>
> --
> RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
> Please post back to this forum so all may benefit.
>
> Message posted via http://www.accessmonster.com
>
>

 
Reply With Quote
 
ruralguy via AccessMonster.com
Guest
Posts: n/a
 
      30th Oct 2007
You are describing a form that has no records in its RecordSource. Open the
query in Datasheet mode to see what records return.

nytwodees wrote:
>Thanks for your reply!
>
>I created a query which linked the ClientIDs of the 2 tables (as per your
>suggestion). I then created a form populated by fields from the query. For
>some reason, when I try to view the form, all I see is a blank form with
>neither labels nor fields. I do not understand what's causing this problem.
>Any ideas?
>
>> All you should need to pass is the ClientID to the next form which can be
>> passed in the OpenArgs argument. The next form should be based on a query

>[quoted text clipped - 12 lines]
>> >Can anyone describe to me how I might accomplish the above by using a
>> >control button?


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200710/1

 
Reply With Quote
 
=?Utf-8?B?bnl0d29kZWVz?=
Guest
Posts: n/a
 
      31st Oct 2007
The Datasheet View shows only the Field Labels, No data fields at all.



"ruralguy via AccessMonster.com" wrote:

> You are describing a form that has no records in its RecordSource. Open the
> query in Datasheet mode to see what records return.
>
> nytwodees wrote:
> >Thanks for your reply!
> >
> >I created a query which linked the ClientIDs of the 2 tables (as per your
> >suggestion). I then created a form populated by fields from the query. For
> >some reason, when I try to view the form, all I see is a blank form with
> >neither labels nor fields. I do not understand what's causing this problem.
> >Any ideas?
> >
> >> All you should need to pass is the ClientID to the next form which can be
> >> passed in the OpenArgs argument. The next form should be based on a query

> >[quoted text clipped - 12 lines]
> >> >Can anyone describe to me how I might accomplish the above by using a
> >> >control button?

>
> --
> RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
> Please post back to this forum so all may benefit.
>
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/For...ccess/200710/1
>
>

 
Reply With Quote
 
ruralguy via AccessMonster.com
Guest
Posts: n/a
 
      31st Oct 2007
There is something in the way you have constructed the query that eliminates
all returned records from the selection. Switch to SQL view in the query and
post the results here and we'll see if we can help.

nytwodees wrote:
>The Datasheet View shows only the Field Labels, No data fields at all.
>
>> You are describing a form that has no records in its RecordSource. Open the
>> query in Datasheet mode to see what records return.

>[quoted text clipped - 12 lines]
>> >> >Can anyone describe to me how I might accomplish the above by using a
>> >> >control button?


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200710/1

 
Reply With Quote
 
=?Utf-8?B?bnl0d29kZWVz?=
Guest
Posts: n/a
 
      31st Oct 2007
The SQL view is as follows:

SELECT tbTradeShows.MM_TradeShowNum, tb1Company.CompanyID,
tbTradeShows.MM_ExhibitID, tbTradeShows.MM_Year, tbTradeShows.MM_Name,
tbTradeShows.MM_BoothType, tbTradeShows.MM_ShowCompanyType,
tbTradeShows.MM_ElecRequirements, tbTradeShows.[MM_Water Requirement],
tbTradeShows.MM_Booth1, tbTradeShows.MM_Booth2
FROM tb1Company INNER JOIN tbTradeShows ON (tb1Company.CC_Name =
tbTradeShows.MM_Name) AND (tb1Company.CompanyID = tbTradeShows.MM_ExhibitID);


"ruralguy via AccessMonster.com" wrote:

> There is something in the way you have constructed the query that eliminates
> all returned records from the selection. Switch to SQL view in the query and
> post the results here and we'll see if we can help.
>
> nytwodees wrote:
> >The Datasheet View shows only the Field Labels, No data fields at all.
> >
> >> You are describing a form that has no records in its RecordSource. Open the
> >> query in Datasheet mode to see what records return.

> >[quoted text clipped - 12 lines]
> >> >> >Can anyone describe to me how I might accomplish the above by using a
> >> >> >control button?

>
> --
> RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
> Please post back to this forum so all may benefit.
>
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/For...ccess/200710/1
>
>

 
Reply With Quote
 
ruralguy via AccessMonster.com
Guest
Posts: n/a
 
      31st Oct 2007
And you feel certain that there is at least one record that meets the
criteria:

tb1Company.CC_Name = tbTradeShows.MM_Name
AND
tb1Company.CompanyID = tbTradeShows.MM_ExhibitID

...is that correct? Try removing each criteria one at a time and see how many
records each one has.

nytwodees wrote:
>The SQL view is as follows:
>
>SELECT tbTradeShows.MM_TradeShowNum, tb1Company.CompanyID,
>tbTradeShows.MM_ExhibitID, tbTradeShows.MM_Year, tbTradeShows.MM_Name,
>tbTradeShows.MM_BoothType, tbTradeShows.MM_ShowCompanyType,
>tbTradeShows.MM_ElecRequirements, tbTradeShows.[MM_Water Requirement],
>tbTradeShows.MM_Booth1, tbTradeShows.MM_Booth2
>FROM tb1Company INNER JOIN tbTradeShows ON (tb1Company.CC_Name =
>tbTradeShows.MM_Name) AND (tb1Company.CompanyID = tbTradeShows.MM_ExhibitID);
>
>> There is something in the way you have constructed the query that eliminates
>> all returned records from the selection. Switch to SQL view in the query and

>[quoted text clipped - 7 lines]
>> >> >> >Can anyone describe to me how I might accomplish the above by using a
>> >> >> >control button?


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200710/1

 
Reply With Quote
 
=?Utf-8?B?bnl0d29kZWVz?=
Guest
Posts: n/a
 
      31st Oct 2007
I think there is some sort of misunderstanding.

The Trade Show Attendees table is NEW and is empty (no records yet!). I am
trying to create records in this table by clicking on a Client Info Form
button that uses the current record from the Client Info Form to create a new
record in the Trade Show Attendee Form. The Trade Show Attendee Form will
have fields specific for that form. The 2 forms are linked by the CompanyID
and the MM_ExhibitID.



"ruralguy via AccessMonster.com" wrote:

> And you feel certain that there is at least one record that meets the
> criteria:
>
> tb1Company.CC_Name = tbTradeShows.MM_Name
> AND
> tb1Company.CompanyID = tbTradeShows.MM_ExhibitID
>
> ...is that correct? Try removing each criteria one at a time and see how many
> records each one has.
>
> nytwodees wrote:
> >The SQL view is as follows:
> >
> >SELECT tbTradeShows.MM_TradeShowNum, tb1Company.CompanyID,
> >tbTradeShows.MM_ExhibitID, tbTradeShows.MM_Year, tbTradeShows.MM_Name,
> >tbTradeShows.MM_BoothType, tbTradeShows.MM_ShowCompanyType,
> >tbTradeShows.MM_ElecRequirements, tbTradeShows.[MM_Water Requirement],
> >tbTradeShows.MM_Booth1, tbTradeShows.MM_Booth2
> >FROM tb1Company INNER JOIN tbTradeShows ON (tb1Company.CC_Name =
> >tbTradeShows.MM_Name) AND (tb1Company.CompanyID = tbTradeShows.MM_ExhibitID);
> >
> >> There is something in the way you have constructed the query that eliminates
> >> all returned records from the selection. Switch to SQL view in the query and

> >[quoted text clipped - 7 lines]
> >> >> >> >Can anyone describe to me how I might accomplish the above by using a
> >> >> >> >control button?

>
> --
> RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
> Please post back to this forum so all may benefit.
>
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/For...ccess/200710/1
>
>

 
Reply With Quote
 
ruralguy via AccessMonster.com
Guest
Posts: n/a
 
      31st Oct 2007
Do you have AllowEdits and AllowAdditions set to YES on your form?

nytwodees wrote:
>I think there is some sort of misunderstanding.
>
>The Trade Show Attendees table is NEW and is empty (no records yet!). I am
>trying to create records in this table by clicking on a Client Info Form
>button that uses the current record from the Client Info Form to create a new
>record in the Trade Show Attendee Form. The Trade Show Attendee Form will
>have fields specific for that form. The 2 forms are linked by the CompanyID
>and the MM_ExhibitID.
>
>> And you feel certain that there is at least one record that meets the
>> criteria:

>[quoted text clipped - 21 lines]
>> >> >> >> >Can anyone describe to me how I might accomplish the above by using a
>> >> >> >> >control button?


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200710/1

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a form command button that moves the form to a random record John S. Ford, MD Microsoft Access Forms 2 17th Jul 2009 04:01 PM
On Form, Save Record and Create New Record based on the change of one control jcamrud Microsoft Access Forms 0 19th Jan 2007 04:53 PM
Control button looses link to specific record in underlying form =?Utf-8?B?TXMuIE1heWhldw==?= Microsoft Access Forms 3 10th Jul 2006 08:24 PM
Create a button on a form to add a file path to a record =?Utf-8?B?YmphY2s4MjY0?= Microsoft Access 1 26th Aug 2005 03:47 PM
Create a button to save/update record OR add new record =?Utf-8?B?RHJld1RoZUZhdGhlcg==?= Microsoft Access Forms 21 11th Aug 2005 11:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:29 AM.