472,347 Members | 2,409 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,347 software developers and data experts.

Creating New Records with Checked Items

I am working on a form in which I have a shopping list of items that
the user can check off and then beside each they can indicate the
quantity they wish to order. I want each checked item to be a separate
record in the underlying table. I'm just not sure how to use VBA to
pass each of the selected items to a new record in the table. Any
advice?

Nov 13 '05 #1
1 1337
dhildebrandt,
Not so much VBA as SQL. Something like:
"INSERT INTO TEMP_ORDERED_ITEMS_TBL (ITEM_NO, PURCHASE)
VALUES ('100',True);" This would work if you only had one item and had the
values to be added in a stored variable or array. If there is a source
table in the database like an item master table with on-hand quantities then
you can pull items from the item master that show an on-hand quantity that
is equal to or less than the reorder quantity. For example:
"INSERT INTO TEMP_ORDERED_ITEMS_TBL (ITEM_NO, PURCHASE)
SELECT ITEM_MASTER_TBL.ITEM_NO, -1 AS PURCHASE
FROM ITEM_MASTER_TBL
WHERE ITEM_MASTER_TBL.OH_QTY < ITEM_MASTER_TBL.REORDER_QTY"
This is similar to what I do on my Home Accounting database I use for
myself. I've got an .mde of it at
http://home.comcast.net/~knogeek/downloads.htm.

--
Alan Webb
kn*******@SPAMhotmail.com
"It's not IT, it's IS
<dh**********@wrha.mb.ca> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
I am working on a form in which I have a shopping list of items that
the user can check off and then beside each they can indicate the
quantity they wish to order. I want each checked item to be a separate
record in the underlying table. I'm just not sure how to use VBA to
pass each of the selected items to a new record in the table. Any
advice?

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Ken Fine | last post by:
(originally posted to one of macromedia's groups; no help, so hopefully someone here can help me out. I'm using VBScript ASP.) When designing...
6
by: F-13 | last post by:
I'm working on a BOM in Access 200 from an example downloaded from from the web. The sample database contains three tables, Assemblies (the list of...
5
by: David Baker | last post by:
Hi all I am very new to ASP.Net. I am trying to create a sniffer for our program. We want our users to click our sniffer and hopefully the sniffer...
1
by: VB Programmer | last post by:
Simple: I have a datalist that is holding a bunch of job opportunities. Beside each opp (in the item template) there's a checkbox that says...
10
by: dm1608 | last post by:
Hi, all. I have a requirement for one of my programs to have a "Checked Listbox" that contains a list of all my local/remote drives. I woudl...
3
by: triplejump24 | last post by:
i LOVE doing c++ programming, but i never can get myself started! Once i figure it out, its fun but anyways here it goes... Im given a file...
2
by: astolpho | last post by:
I am using a slightly outdated reference book on J2EE programming. It gives 2 methods of creating a database used in its casestudies. The first is an...
7
by: wqmmnm | last post by:
How do I create an html list using php and mysql that also has the previous and next funtionality.
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.