473,545 Members | 2,001 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Edit multiple tables with one form per record

I'm really not sure how to go about this in Access. What I've created
is a table for each location. Those tables are identical in format but
different in information.

The tables are named after key points such as the store number and the
store ID. The fields of those tables are generic fields such as sales
per day, bank deposit and what not. The first field for each store
table is the date and I've set that as the primary key as one store
cannot have more than one sales data per day.

The problem I have encountered is that I cannot seem to create a form
that will have a data entry box called DATE in which I enter in the
date.
Along those lines, I cannot seem to have some thirty tables or so have
strictly the records come up which correspond to that selected date.
That way I can enter in information corresponding to 9/26/2005 for all
thirty stores (or however many store tables there are).

I tried to start simple and create a form that will let me edit
multiple tables, but when I copy over the boxes from one form to
another form, it seems to revert all the entry boxes to the first
table. I am confused on how to proceed and complete this form in MS
Access.

Dec 30 '05 #1
13 6761
Ricky, this is not how you create a relational database.

You need a Store table, with one record for each store. Fields:
StoreID AutoNumber or unique code for the store. Primary key
StoreName Full name of this store.
Suburb Where the store is.

Then you need a Sale table that contains the sales info for all stores. It
will have fields:
SaleID AutoNumber (primary key)
StoreID Relates to Store.StoreID (which store this entry is)
SaleDate Date/Time The date for this entry.
Amount Currency The amount of sales for this store on this date.

You can now create a form bound to the Sale table. It will have a combo box
for selecting the store.

If you prefer, you could create a main form bound to the Store table, with a
subform bound to the Sale table. The subform would show the sales for that
store (one row for each date.)

BTW, don't call a field Date: that's a reserved word for the system date.

HTH.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<ri***********@ gmail.com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. .
I'm really not sure how to go about this in Access. What I've created
is a table for each location. Those tables are identical in format but
different in information.

The tables are named after key points such as the store number and the
store ID. The fields of those tables are generic fields such as sales
per day, bank deposit and what not. The first field for each store
table is the date and I've set that as the primary key as one store
cannot have more than one sales data per day.

The problem I have encountered is that I cannot seem to create a form
that will have a data entry box called DATE in which I enter in the
date.
Along those lines, I cannot seem to have some thirty tables or so have
strictly the records come up which correspond to that selected date.
That way I can enter in information corresponding to 9/26/2005 for all
thirty stores (or however many store tables there are).

I tried to start simple and create a form that will let me edit
multiple tables, but when I copy over the boxes from one form to
another form, it seems to revert all the entry boxes to the first
table. I am confused on how to proceed and complete this form in MS
Access.

Dec 30 '05 #2
Perhaps I was breaking down the information too much.
If I combine all the store tables into one table, then I have gone
around the issue of not being able to edit multiple tables with a form
because I'll have my sales information in one table.

But that still brings me back to an original problem I could not figure
out how to solve.
In the form, it displays all entries in the table. I just want to add a
new record.

Perhaps something like this..

--- DATE ---
STORE ID^1 | SALES^1 | DEPOSIT^1
STORE ID^2 | SALES^2 | DEPOSIT^2
STORE ID^3 | SALES^3 | DEPOSIT^3
STORE ID^4 | SALES^4 | DEPOSIT^4

When I input data, then whatever I submit with DATE being 9/25/2005,
all the records submitted will have that date in Field1.

Am I looking at the entire aspect the wrong way?

Dec 30 '05 #3
Allen, thanks for your reply.
I do have a Store table, I have called it the Store Master Information
where I have the following fields.
Store Number | Store Address | Store Phone Number| etc,.

I understand what you said with the Sale table, however I do not
understand how I can create a form bound to the Sale table.
I don't need to show sales for more than one date at a time. I just
need to be able to enter the information for all the stores in one
screen/form to make it easy to enter information.

Once again, thank you for your help, I appreciate it and now I know
that going to a table per store solution was incorrect. I will have a
Store table which has all the stores and their corresponding
information, and then a Sales table which will have all the sales
information.

I will try to search in my Access book about bounding.

Dec 30 '05 #4
ri***********@g mail.com wrote:
I'm really not sure how to go about this in Access. What I've created
is a table for each location. Those tables are identical in format but
different in information.

The tables are named after key points such as the store number and the
store ID. The fields of those tables are generic fields such as sales
per day, bank deposit and what not. The first field for each store
table is the date and I've set that as the primary key as one store
cannot have more than one sales data per day.

The problem I have encountered is that I cannot seem to create a form
that will have a data entry box called DATE in which I enter in the
date.
Along those lines, I cannot seem to have some thirty tables or so have
strictly the records come up which correspond to that selected date.
That way I can enter in information corresponding to 9/26/2005 for all
thirty stores (or however many store tables there are).
I'm sure others will point out that DATE is a reserved word and should
not be used. Can you not name the field StoreDate or something similar?

I don't know why you don't have 1 table instead of 30 stores. It would
make things so much simpler. What happens if one of those stores
closes? What happens if you you add another store? Then your system
becomes less usable.

You should be able to select a store, a date, and filter records that
match that store id and date.

I tried to start simple and create a form that will let me edit
multiple tables, but when I copy over the boxes from one form to
another form, it seems to revert all the entry boxes to the first
table. I am confused on how to proceed and complete this form in MS
Access.


A form can be unbound and bound. If unbound, no table is associated
with the form. You would update the information when a Save button is
pressed. You would fill in the record's data when you go to a new
record. This is more work than a bound form.

A bound form is associated with a table. Let's say your form's
RecordSource (property sheet, data tab for the form) is
Store1Table
or
Select * from Store1Table

When you move to another store, you need to switch the RecordSource.
Let's say it opens to Store1Table. You now select Store2Table from a
dropdown. You would then do something like
Me.RecordSource = Store2Table
or
Select * from Store2Table

Your life can be complicated or uncomplicated. You can make a mountain
out of a molehill or climb real mountains. You might want to consider
changing direction to making your life easier so you can tackle the real
problems that will confront you.
Dec 30 '05 #5
Regardless of what interface you choose, you will need all the sales info in
the one table.

There is no problem with entering the same date on several rows, for several
stores.

If you want the date text box to default to today, just set its Default
Value property to:
=Date()

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<ri***********@ gmail.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
Allen, thanks for your reply.
I do have a Store table, I have called it the Store Master Information
where I have the following fields.
Store Number | Store Address | Store Phone Number| etc,.

I understand what you said with the Sale table, however I do not
understand how I can create a form bound to the Sale table.
I don't need to show sales for more than one date at a time. I just
need to be able to enter the information for all the stores in one
screen/form to make it easy to enter information.

Once again, thank you for your help, I appreciate it and now I know
that going to a table per store solution was incorrect. I will have a
Store table which has all the stores and their corresponding
information, and then a Sales table which will have all the sales
information.

I will try to search in my Access book about bounding.

Dec 30 '05 #6
Setting the default value property to =Date() was a fantastic idea!
Thanks!!

I'm sorting through some help files and google to learn more about
bounding. I think I've gotten it down.

I've created a form with the following entry boxes.

STORE ID | SALESDATE | GROSS SALES | DEPOSIT

Now I have created a lookup so the STOREID is a drop down box.
SALESDATE is automatically entered in with todays date.
GROSSSALES and DEPOSIT are both currency.

What do I have to do to make it so that only those records with todays
date (or a specified date, I might try to figure out how to turn it
into a drop down box) are shown?
I just did a test and it shows ALL records that are in the Sales table.
That could get confusing.

Dec 30 '05 #7
Salad, thanks for your reply!
I have created one table rather than 30 or so for each store. It is
much simplier to have one table for multiple reasons.

I think I have figured out a way to have only specified dates appear.
To use the filters!

I can simply apply a filter of 9/25/2005 and only those records with
those corresponding dates will come up!

The only problem I can see with what I have created so far is skipping
a store. However I can run a query later on to display a list of the
stores and their latest data entry. I'll have to figure out how to do
that (I haven't even look yet).

Or should I create a form with all thirty stores information displayed
without the STOREID drop down box so that folks know which stores have
their information entered in or not?

Dec 30 '05 #8
Salad, thanks for your advice! I did move to having all the stores in
one table. It is truly much simpler.

Now that you bring up the issue of clones, is there a check I can
install that will prevent a duplicate record from existing using the
following criteria?

if((SalesDate && StoreID) exist)
DisplayErrorBox ;

Or something like that to prevent someone from incorrectly entering in
data for a store.

Dec 30 '05 #9
I guess this brings me to my next step.

I understand that Access can store Number, Int, Currency and many more.
Can Access store Array's or perhaps CSV which I can tell Access to
GetChar until it hits a Comma and consider the order the characters
recieved as one type of object?

I think that would be really easy to use form wise, and report wise as
well as storage wise.

The problem I've encountered is I can't edit all 33 stores information
at one time and move to the next day easily.

Dec 30 '05 #10

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

Similar topics

25
10364
by: dixie | last post by:
I have some code that adds new records into a table for each ID in a list box when a button on a form is clicked. This works fine. My problem now is that I wish to be able to edit all the records for people whose ID is in the list box. I made minor changes to the code (mainly replacing rs.AddNew with rs.Edit)and it appears to be updating...
0
1796
by: allyn44 | last post by:
HI--I have 2 tables Cut: cut ID, HistNumb, Block, date: Cut Id is the primary key, the other 3 fileds are indexed to be unique Slides: Cutid SlideID, and various other fields: there can be multiple slide records per CutID. This table is a subdatashet of the Cut table--so the CutId is stored in it I have a form based on a query between...
6
7612
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 items needed to assemble any assembly), Components (the list of items recognised by the Assemblies Table)and Output (a table used to display the BOM from a chosen assembly). It works fine but...
3
1983
by: Damon Grieves | last post by:
Hi I have a large table which I wanted to filter and then edit the selected record. I'm using a form with several pull down fields linked to lookup tables which correspond to fields in the large table. The user selects a number or category or All from the pull-down and this is used in a query, made up of the main table and the lookup tables...
6
10465
by: ApexData | last post by:
I have 2 tables: Table1 and Table2. Neither one has a primary key because each table will only have 1-record. My form is a SingleForm unbound with tabs (my desire here). Using this form, in the Record Source I originally had the statement TABLE1, and all worked fine. Now I want to open the second table as well, and this is where my...
1
24689
by: ortega.rad | last post by:
I have a form which allows you to select a record. That record has other records asscociated with it via a table. The asscociated records of the record selected on the main form are shown in a subform. This all works fine. But then, when I try to edit a record in the subform It does not let me. I have a dropdown box, but cannot select...
7
15624
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is there an equivalent property for the DataGridView? I have searched, but have not found one. I would like the user to be able to see all the columns...
8
1974
by: =?Utf-8?B?bWlrZWc=?= | last post by:
Hi, I am building a small Help Desk application for my company and need to be able to edit "open" help desk issues. I use a simple datagrid to display each issue (6 per page) , with an Edit button. There are a lot of fields across, and my Network Admins would like a way of editing/updating each issue seperately in a a vertical form. I...
4
3290
by: dantebothermy | last post by:
I have an Access form with multiple tabs; the underlying table is in SQL Server. The problem comes up when I edit and save a record on tab 1, then go to tab 2 to to edit a different field of the same record. I get the following error message: The data has been changed Another user has edited this record and saved the changes before you...
0
7479
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7411
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7669
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7439
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5987
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5343
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4962
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3468
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.