473,403 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

how to generate a form using data from another table.

i have an item list table containing this data
itemID1 banana
itemID2 orange
itemID3 potato
...
itemID20 spinach

i also have another transaction table that takes in
orderID itemID quantity

i want a form that pulls out all these items and has an input for me to create an order

i.e. the form should look like this from the start
banana BLANKTEXTBOX
orange BLANKTEXTBOX
potato BLANKTEXTBOX
...
spinach BLANKTEXTBOX

SUBMIT

when i click submit it should insert new data records into the transaction table

how do i do the prepopulation bit?

i know how to do a blank one that i fill in one at a time using a subform, but i don't know how to get the subforms to already have all the items inserted so that the user only has to key in the quantities.
May 23 '15 #1
6 1299
no it's different.

okay, maybe i re-explain.

table 1 - item data
fields: itemID itemName someOtherFields
it has x number of records
1 banana yellow
2 orange orange
3 potato brown
...
20 spinach green

table 2 - transactions
fields: orderID itemID quantityPurchased
1 1 3
1 2 3
1 19 7
2 7 5
2 5 5
etc

instead of having a form that has a subform that i can insert the item one by one
e.g.
i select from dropdown - potato, then fill quantity 4
i select from dropdown - spinach, then fill quantity 7

i want the form to appear immediately as a grid containing all the items in the item table

banana textbox
orange textbox
potato textbox
...
spinach textbox

submit button

then immediately if the quantity is not 0, the record is inserted into the transaction table.
May 23 '15 #3
so it's not

i select banana

then the form becomes

banana
yellow
textbox

that one i can do.
May 23 '15 #4
Rabbit
12,516 Expert Mod 8TB
Wouldn't the form be a bit unwieldy to use? Usually order forms are done by selecting what item they are purchasing, not listing every item available for purchase. Makes the form a bit difficult to use when there's a ton of irrelevant controls the user doesn't need to use.
May 23 '15 #5
it's a stock checking form, so all the inventory data needs to be there.
May 23 '15 #6
Rabbit
12,516 Expert Mod 8TB
I see, I was confused because the table had a field named order id.

One way to do it is to insert all the items into the transaction table when they decide to initiate an inventory count.

But if you don't want to include the 0's in the transaction table, then insert them first into a temporary table. Then when they click submit, insert the non-zero rows into the transaction table.
May 23 '15 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: PerryC | last post by:
Scenario: FormA: Field1, Field2 (Field1 is a combo box based on a NameTable w/ Name and phone fields) When users choose Field1 with Name1 (in record1 of NameTable), Field2 will...
3
by: colleen1980 | last post by:
Hi: Can any one please help me when user select 2 dates from DDLDate1 10/09/2006 and DDLDate2 10/12/06 and the name and it close the form. I need to create multiple records in the another table on...
4
by: PRLIT | last post by:
First, let me just say that I've been looking at this site for help for awhile now. Thank you for all the help you given me over the past few months. Second, I'm creating a form in Access 2007. I...
0
by: cb123 | last post by:
Hello, Please bear with me I'm new to t-sql. I've had no luck trying to figure this out yet using sql code. I need to use an existing table (data dictionary) as input for creating a new table. ...
1
by: fclanton | last post by:
my item table looks like this: itemID name description 1 coin1 good coin 24 coin2 bad 35 coin3 bad 48 coin4 bad i need to use the description...
24
by: Mr Hero | last post by:
I have 2 tables, one table is for the form to input records; and the other table is for keeping balances. How can I get my Balances table to update as new entries (+ or -) is entered in the input...
5
by: CD Tom | last post by:
Here's my problem. I have a person in New Zealand that I'm having problems with the date. Everything works fine except I have a date field in one form that updates another table with the date. I'm...
8
by: Shannon Mathews | last post by:
Ok trying to explain... 1. I have a tblMain that holds the master list of all my checks. 2. I'm currently using a make table query "qryCheckHoldingListCreateTbl" to get a list of all the checks...
1
by: LinkedTableMan | last post by:
I'm trying to use the FIND command to search for a specific value in whatever field I focus on. I'm using MS Access 2007. The table the form is using is linked to SQLServer someplace on the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.