473,385 Members | 1,846 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,385 software developers and data experts.

Form not showing data from tables

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 8047
Rabbit
12,516 Expert Mod 8TB
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
I will do that, thank you very much for your reply!!!!!
Apr 2 '07 #3
Rabbit
12,516 Expert Mod 8TB
Not a problem, let us know how you get along.
Apr 2 '07 #4
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
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 Expert Mod 8TB
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
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 256MB
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.ApplicantID" [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
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.ApplicantID" [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 "Relationship 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
AccessIdiot
493 256MB
No that shouldn't be a problem but check the number type. It needs to be an integer and not something with a decimal.
Apr 4 '07 #11
No that shouldn't be a problem but check the number type. It needs to be an integer and not something with a decimal.

I checked them all and they are all integers. hmmm wonder why it is giving me that error message then.
Apr 4 '07 #12
aah, nevermind, found that, They have to having matching Fieldsizes if one is an autonumber and the other is a number.

Thanks for all your help. Hopefully this will solve all my problems!!
Apr 4 '07 #13
AccessIdiot
493 256MB
Yes, the field size is where you set it to be long integer, short integer, single, double, etc. :)
Apr 4 '07 #14
Yes, the field size is where you set it to be long integer, short integer, single, double, etc. :)
Thank you so much!!!
Apr 4 '07 #15
Rabbit
12,516 Expert Mod 8TB
Nice job Melissa.
Apr 4 '07 #16
AccessIdiot
493 256MB
Glad to help for once! :)
Apr 5 '07 #17
Denburt
1,356 Expert 1GB
Impressive, nice job Melissa.
Apr 5 '07 #18
Denburt
1,356 Expert 1GB
Oh and WTG Mary glad you got it.
Apr 5 '07 #19

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

Similar topics

1
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,...
2
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...
25
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...
2
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...
8
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...
8
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...
4
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...
5
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...
3
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...
2
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.