Multiple Record Inputs with one Form

  • Thread starter Thread starter Graffyn
  • Start date Start date
G

Graffyn

I'm programming with SQL and can't seem how to figure out how to send more
than one record to the table with one form.
 
You've described a "how" ... as in how you are trying to do something ("send
more than one record to the table with one form").

Now, "why" ... as in what will having multiple records generated from a
single form allow you to do (i.e., business need)?

This isn't idle curiosity ... if we knew more about the underlying business
need, we might be able to offer alternate approaches.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
I'm working on a payroll form and there are twelve entries on each "form". I
want to be able to recreate this form that has been used as paper, which I
have I just can not get the next record of information to be separate when
adding to the table. I actually double posted my problem....sorry about that,
the other titled Mulitple Record(12 entries) w/ form. She asked me to look
up an append query but I still have only basic knowledge of this SQL language
from w3schools.com. Also when i create my form I can not seem to separate the
information entered in the text box name1 from name2 the same name pops up on
both text boxes when i enter in of them. Thanks for your time
 
It all starts with the data. You're describing the forms.

Hint: whenever I see a description of a form "with 12 entries", I suspect
someone has tried to convert a spreadsheet into an Access database. Access
is not a spreadsheet on steroids, it's a relational database, and requires
some new ways of thinking about data.

I'm still looking for a description of the underlying business need, rather
than the approach used to satisfy the (as yet unclear) need.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
The underlying business need is to recreate the payroll form, making data
entry easier than to do by hand. Also to take all entries entered into
computer and store into a table and make a database.
 
I'm sorry if I sound like a broken record ...

"making a database", by itself, is worthless ... having a database (a set of
data stored somewhere) only provides work for the person who designs the
database.

Having a way to report payroll to the CEO, by month, is a business need.

"easier data entry" is, by itself, worthless ... unless you ALSO have some
way of getting the data back out and doing something with it.

I really am looking for a better idea of what having easier data entry and a
database (apparently payroll-related) will let you do.

If you only need to recreate a payroll form, you are taking on a tremendous
learning curve trying to force it into a relational database.

If you entered data on an Excel spreadsheet, you'd simply save the file ...
THAT is a database, of sorts. What is it that you want to DO with the data?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Sorry for the massive posts... I was told to take on a job I have no
experience with the language... i found this:

Dim strSQL As String
Dim intCount As Integer

For intCount = 1 To Me![txtNumberofRecs]

strSQL = "INSERT INTO table (field1, field2, etc.) "
strSQL = strSQL & "VALUES(" & Me!TissueNumber & ", "
strSQL = strSQL & Me!field2 & ", etc.);"

DoCmd.RunSQL strSQL

Next intCount

This code looks like it will do what i want. Create a access table with all
the entries from the form inputed. Lets say we start out with two entries.
A Date the person worked and their Social. I have a form with two entries
for social security numbers. This is the code I'm working with now:

im strSQL As String
Dim intCount As Integer

For intCount = 1 To 2

strSQL = "INSERT INTO PayrollTable (Date, SSN) VALUES ( & Me!DateField &
Me!SSN(intCount) )"

DoCmd.RunSQL strSQL

Next intCount
 
Perhaps other newsgroup readers have a better idea what you are trying to
accomplish, and experience doing that. I've reached the end of what I
understand/know about.

Best of luck

Regards

Jeff Boyce
Microsoft Office/Access MVP

Graffyn said:
Sorry for the massive posts... I was told to take on a job I have no
experience with the language... i found this:

Dim strSQL As String
Dim intCount As Integer

For intCount = 1 To Me![txtNumberofRecs]

strSQL = "INSERT INTO table (field1, field2, etc.) "
strSQL = strSQL & "VALUES(" & Me!TissueNumber & ", "
strSQL = strSQL & Me!field2 & ", etc.);"

DoCmd.RunSQL strSQL

Next intCount

This code looks like it will do what i want. Create a access table with
all
the entries from the form inputed. Lets say we start out with two
entries.
A Date the person worked and their Social. I have a form with two entries
for social security numbers. This is the code I'm working with now:

im strSQL As String
Dim intCount As Integer

For intCount = 1 To 2

strSQL = "INSERT INTO PayrollTable (Date, SSN) VALUES ( & Me!DateField &
Me!SSN(intCount) )"

DoCmd.RunSQL strSQL

Next intCount


Jeff Boyce said:
I'm sorry if I sound like a broken record ...

"making a database", by itself, is worthless ... having a database (a set
of
data stored somewhere) only provides work for the person who designs the
database.

Having a way to report payroll to the CEO, by month, is a business need.

"easier data entry" is, by itself, worthless ... unless you ALSO have
some
way of getting the data back out and doing something with it.

I really am looking for a better idea of what having easier data entry
and a
database (apparently payroll-related) will let you do.

If you only need to recreate a payroll form, you are taking on a
tremendous
learning curve trying to force it into a relational database.

If you entered data on an Excel spreadsheet, you'd simply save the file
...
THAT is a database, of sorts. What is it that you want to DO with the
data?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top