A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Multiple Records from 1 Form



 
 
Thread Tools Display Modes
  #1  
Old May 1st, 2008, 02:54 AM posted to microsoft.public.access.forms
Christoph[_2_]
external usenet poster
 
Posts: 15
Default Multiple Records from 1 Form

Hi, it seems so simple but I just haven't been able to do the
following (I simplified the situation here a bit):

I have a very basic form that looks like this:


[ ] Alpha
[ ] Beta
[ ] Gamma


SUBMIT


In words: there are three checkboxes and a button at the end of the
form.


In addition, I have a basic table with only one text field "Letter"
defined.


When the button is pressed, I would like for as many records added to
the table as there are checkmarks. In other words, when only the
Alpha
checkbox is checked, I would like to add the following to my table:


Letter
--------------
Alpha


If Alpha and Beta are checked, I would like the following records
added to the table


Letter
--------------
Alpha
Beta


In other words, adding two records, etc. If all three are checked,
then three records are added.


I'm fine with VBA or whatever needs to be done but this has been
driving me crazy for a while now.


If this is the wrong group for this, I apologize. Maybe somebody can
point me into the right direction.


Any help is greatly appreciated.


Christoph


  #2  
Old May 1st, 2008, 06:46 AM posted to microsoft.public.access.forms
magicdds-[_2_]
external usenet poster
 
Posts: 38
Default Multiple Records from 1 Form

You might try this:

On the: On click event procedure of SUBMIT command Button

If Alpha = -1 then DoCmd.OpenQuery "Alpha Query"
If Beta = -1 then DoCmd.OpenQuery "Beta Query"
If Gamma = -1 then DoCmd.OpenQuery "Gamma Query"

The Alpha Query is an Append Query that adds a record to your table with the
word "alpha" in the LETTER field.
The Beta Query is an Append Query that adds a record to your table with the
word "beta" in the LETTER field.
The Gamma Query is an Append Query that adds a record to your table with the
word "Gamma" in the LETTER field.

Hope this works for you.
Mark David



"Christoph" wrote:

Hi, it seems so simple but I just haven't been able to do the
following (I simplified the situation here a bit):

I have a very basic form that looks like this:


[ ] Alpha
[ ] Beta
[ ] Gamma


SUBMIT


In words: there are three checkboxes and a button at the end of the
form.


In addition, I have a basic table with only one text field "Letter"
defined.


When the button is pressed, I would like for as many records added to
the table as there are checkmarks. In other words, when only the
Alpha
checkbox is checked, I would like to add the following to my table:


Letter
--------------
Alpha


If Alpha and Beta are checked, I would like the following records
added to the table


Letter
--------------
Alpha
Beta


In other words, adding two records, etc. If all three are checked,
then three records are added.


I'm fine with VBA or whatever needs to be done but this has been
driving me crazy for a while now.


If this is the wrong group for this, I apologize. Maybe somebody can
point me into the right direction.


Any help is greatly appreciated.


Christoph



  #3  
Old May 2nd, 2008, 02:24 AM posted to microsoft.public.access.forms
Christoph[_2_]
external usenet poster
 
Posts: 15
Default Multiple Records from 1 Form

On May 1, 1:46*am, magicdds-
wrote:
You might try this:

On the: On click event procedure of SUBMIT command Button

If Alpha = -1 then DoCmd.OpenQuery "Alpha Query"
If Beta = -1 then DoCmd.OpenQuery "Beta Query"
If Gamma = -1 then DoCmd.OpenQuery "Gamma Query"

The Alpha Query is an Append Query that adds a record to your table with the
word "alpha" in the LETTER field.
The Beta Query is an Append Query that adds a record to your table with the
word "beta" in the LETTER field.
The Gamma Query is an Append Query that adds a record to your table with the
word "Gamma" in the LETTER field.

Hope this works for you.
Mark David



"Christoph" wrote:
Hi, it seems so simple but I just haven't been able to do the
following (I simplified the situation here a bit):


I have a very basic form that looks like this:


[ *] Alpha
[ *] Beta
[ *] Gamma


SUBMIT


In words: there are three checkboxes and a button at the end of the
form.


In addition, I have a basic table with only one text field "Letter"
defined.


When the button is pressed, I would like for as many records added to
the table as there are checkmarks. In other words, when only the
Alpha
checkbox is checked, I would like to add the following to my table:


Letter
--------------
Alpha


If Alpha and Beta are checked, I would like the following records
added to the table


Letter
--------------
Alpha
Beta


In other words, adding two records, etc. If all three are checked,
then three records are added.


I'm fine with VBA or whatever needs to be done but this has been
driving me crazy for a while now.


If this is the wrong group for this, I apologize. Maybe somebody can
point me into the right direction.


Any help is greatly appreciated.


Christoph- Hide quoted text -


- Show quoted text -


Mark,

this is exactly what I needed! Thank you so very much!
Christoph
 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.