473,799 Members | 3,382 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form not showing data from tables

51 New Member
I am new at the whole Access thing, and recently got a new job. I am creating my first database. I did so in Access 2003. My problem is, I have 10 tables, and I created a tab form with 6 tabs on it. When I enter data on the form/subforms I go out of it and go back into, all my data in the forms are gone. They are in the table though. Can someone please help me. I am sooo new to all this.
It is saving to the table but not the subforms. It is also saving it to the main forms that I created the subforms from. HELP PLEASE!! thanks.
Apr 2 '07 #1
18 8090
Rabbit
12,516 Recognized Expert Moderator MVP
Check the forms that the subform object uses as a source and make sure those form's record source property is bound to the correct tables.
Apr 2 '07 #2
marylipscomb
51 New Member
I will do that, thank you very much for your reply!!!!!
Apr 2 '07 #3
Rabbit
12,516 Recognized Expert Moderator MVP
Not a problem, let us know how you get along.
Apr 2 '07 #4
marylipscomb
51 New Member
They all seem to match up the way they should. Do you think it might have something to do with the fact that I have relationships but they are not one-many relationships, they are just the straight lines connecting the fields?

Sorry, I really am a complete newbie with this stuff.

Thanks
Apr 2 '07 #5
marylipscomb
51 New Member
And also, I have each table linked table to table, should I have all the subforms be linked by the relationship just to the main form instead of main table to first subform, then that subform to the next subform, then the next..?
I hope it is clear what I am asking.
Apr 2 '07 #6
Rabbit
12,516 Recognized Expert Moderator MVP
Just to be clear, do you know that a tab and subform are different things entirely? A tab is not bound to any table, you can only do that with a subform. The tab just let's you spread things over several pages.

The relationships only matter in a form/subform if there are linked fields that you need to carry over. The main form should consist of a primary key and should be unique. The subform should have a corresponding foreign key that doesn't have to be unique.
Apr 2 '07 #7
marylipscomb
51 New Member
Just to be clear, do you know that a tab and subform are different things entirely? A tab is not bound to any table, you can only do that with a subform. The tab just let's you spread things over several pages.

The relationships only matter in a form/subform if there are linked fields that you need to carry over. The main form should consist of a primary key and should be unique. The subform should have a corresponding foreign key that doesn't have to be unique.

No I didn't know that, I thought you had to put a subform on a tab page. Interesting. I think the whole relationship thing is really messing me up. I just created a whole new database to try again and it still isn't working. I create a form, then put a subform on that page, and when I try to enter data on the subform (on that page) it gives me an error. But I can enter the info on the main form on that page.

The error is "You can't assign a value to this object.
*The object may be a control on a read-only form.
*The object may be on a form that is open in Design view.
*The value may be too large for this field."

I know it can't be the middle choice it gives. But I can't find where it might be read-only, and really dont think it is. I don't think it is the last choice either. So I don't know why it is saying that. That was a problem I had with the last database too.

When you say the subform should have a corresponding foreign key that doesn't have to be unique, do you mean that this doesn't have to be an identical name in the form? Like for example,in an Applicant form, I have ApplicantID as the primary key, so in the subform, I can have ApplicantID and it doesn't have to be a primary key, but can link the two together? What if I have other forms as well, which I do, will they all contain the ApplicantID so they can all link?? But on those they will be considered the foreign key?

Thank you so much!!
Apr 3 '07 #8
AccessIdiot
493 Contributor
Be careful with the terms "form" and "table". I often confuse the two in posts and it just gets the folks who are trying to help you confused. :)

What Rabbit is getting at here is fundamental to database design. If you want to link your tables together with ApplicantID then make ApplicantID in your Applicant table (also referred to as "Applicant.Appl icantID" [table.fieldname]) an autonumber field and the primary key of the Applicant table. Now in your other tables you can have ApplicantID be a number field and NOT the primary key. In your relationships diagram you can draw the lines between the tables using the ApplicantID. I would recommend checking the boxes for "enforce referential integrity" and the two "cascade updates/deletes". This will help you troubleshoot if you run into problems later. Also, I'm assuming all your relationships are one to many.

Now all your tables are tied by the ApplicantID. If you have a form that has a control source of the Applicant table and a subform that has a control source of a different table that contains ApplicantID then the two should be tied together by that field.

Hope this helps.
Apr 3 '07 #9
marylipscomb
51 New Member
Be careful with the terms "form" and "table". I often confuse the two in posts and it just gets the folks who are trying to help you confused. :)

What Rabbit is getting at here is fundamental to database design. If you want to link your tables together with ApplicantID then make ApplicantID in your Applicant table (also referred to as "Applicant.Appl icantID" [table.fieldname]) an autonumber field and the primary key of the Applicant table. Now in your other tables you can have ApplicantID be a number field and NOT the primary key. In your relationships diagram you can draw the lines between the tables using the ApplicantID. I would recommend checking the boxes for "enforce referential integrity" and the two "cascade updates/deletes". This will help you troubleshoot if you run into problems later. Also, I'm assuming all your relationships are one to many.

Now all your tables are tied by the ApplicantID. If you have a form that has a control source of the Applicant table and a subform that has a control source of a different table that contains ApplicantID then the two should be tied together by that field.

Hope this helps.

It does help a lot, but came across a problem. I did everything you said and made the ApplicantID the primary key and autonumber in the table, and made the ApplicantID a number field in the remaining tables but when I try to connect them with relationships and check the boxes for "enforce referential integrity" and the two "cascade updates/deletes" a box pops up and says "Relationsh ip must be on the same number of fields with the same data types." I don't think it likes the first ApplicantID being a autonumber and the rest of them being number fields.

Thanks for your help. I appreciate it!!!
Apr 4 '07 #10

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

Similar topics

1
3579
by: Corinne | last post by:
I have a database that contains the details of pupils in a school. What I would like to do may not be possible but I thought I would ask anyway. Each year the pupils move to a different class, there are 8 classes in each year that are named with the year and the class teachers initials e.g 5FS would be a year 5 class, teacher Fred Smith. So every year I have to change the class the pupils are in, thereby losing the classes they have been...
2
1354
by: Michael Plant | last post by:
Hi all. I'm trying to write my first Access database and I'm getting on well. It's for my own small business use and the scenario is this. I have 4 or 5 suppliers who all email their product pricing and databases daily. As they all use different formats etc, I have linked all their data and import using append queries into a single table in a format of my choice. I then manipulate the data and use it to update my pricing according. I...
25
10273
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
2
5061
by: filbennett | last post by:
Hi Everyone, I'm generally unfamiliar with Access form design, but have programmed Cold Fusion applications for a couple of years. I'd like to build a data entry form in Access that allows the following. First, the data schema: Three tables are involved. The first is a PERSONS table which has two fields, SSNUMBER (primary key), and NAME.
8
14791
by: fonzie | last post by:
Is it possible to have a data entry form where the information is stored in several different tables (5 or 6)? I have an inventory database where Table1 stores all of the data common to all entries, Table2 stores only the extra info relevant to items that are TYPEA, Table3 stores only the extra info relevant to items that are TYPEB, and so on. All relationships are setup (one-to-one) between the main table (Table1) and all the other...
8
1842
by: BD | last post by:
Moving from MS Access to .Net using C# languag. Problem trying to duplicate form with structure as follows: 1. Main form 'Work Order' displayed as textboxes 2. subform 'Customers' textboxes showing name, address, etc related by 'CustomerID' 3. subform 'Locations' textboxes showing name, address, etc related by 'LocationID' 4. subform 'Material' on tabbed interface datasheet related by 'WorkOrderID' 5. subform 'Labor' on tabbed...
4
3005
by: dac | last post by:
I am quietly going insane on this project. I've never worked on a project like this one before. All my previous sticky forms were for data entry, not editing. I don't know how to display the form with data from the database, allow the user to update it, and then display the form again with POST data. I can get the data out of the database and get the user updates back into the database, but how do I get the filled-out form back to the user...
5
1619
by: glamster7 | last post by:
Hi Folks, I have a form frm.viewbookings which shows in the header the labels Stylist1 through to Stylist 7 with the stylist names underneath them. In total for the set of data I have there are 14stylists. Ok behind all this we have 2 tables tmp_bookingsGrid & tmp_clientGrid. Also in order to populate the form we run several queries in order to populate these tables with the required data & show the following in the detail section of...
3
5945
by: Ian | last post by:
I have a form with a sub form, on the continues sub for I want to display some data along with a picture, on the On Current event I have the code: .Picture = Nz() is the name of the picture control, is the name of the text field that holds the path to the jpg. What I want is each record in the sub form to show the associated
2
1532
by: Lucas45 | last post by:
Hi I am a newbe at this I have created 3 tables one called computers the other software- and the third installed apps What I am trying to do via a form is to have on the one side a combo box showing the p/c names, and on the other side a combo box showing all the apps. What I am trying to do is to select a pc name from the p/c name combo and then selecting a few apps from the other combo box (installed aps) and this info is written to a table...
0
9544
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10490
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10030
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9077
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6809
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5589
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4145
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2941
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.