My Assistant
![]() ![]() |
|
|
Apr 2 2012, 05:56 AM
Post
#1
|
|
|
UtterAccess Addict Posts: 229 From: South Africa |
I am trying to make a form for my database, it is a database that contains many customer details. On one part of the form I have a tab control setup (well Im working on it) to show some of the details as tabbed pages - I had to do this to save space. However on one of the tabs - CONTACTS - I would like to add a tab control onto that page since the contacts I need displayed there are going to take up space, and I expect the amount of contacts to be displayed to grow as time passes - hence the need of a tab control to save on space. I have also got another page on the original tab control (called ADDRESSES) It is going to need to display at least three addresses on that tab - however I would like to display these as a tab control setup since it will make for easier reading.
My Problem I cannot seem to add a tab control ontop of another tab control, it seems to appear on all my tab control pages (basically on the main form itself) Now I assume tab control are sort of like layers - is the some way to move a control onto a different "layer" (in this case a tab control onto an existing tab control). Im also worried that this setup of tab controls ontop of tab controls is going to become confusing to people using the database - any suggestions that I can use to "lessen" the confusion? The tab control setup seems like the solution though. Im using Access 2007 This post has been edited by nickynoo: Apr 2 2012, 05:59 AM |
|
|
|
Apr 2 2012, 06:09 AM
Post
#2
|
|
|
Utterly Yorkshire and Forum/Wiki Editor Posts: 15,886 From: Devon UK |
Hi
You can't add a tab control to a tab control directly as you've discovered. What you can do though is to add a tab control to a different (new) form, then add that new form as a subform to your original form's tab control on the page you want it to appear. Format the subform control as you want it and it will appear to all intents and purposes that you have a tab control on a tab control (IMG:style_emoticons/default/wink.gif) |
|
|
|
Apr 2 2012, 06:37 AM
Post
#3
|
|
|
UtterAccess Addict Posts: 229 From: South Africa |
Thankyou - will give it a shot
|
|
|
|
Apr 2 2012, 06:40 AM
Post
#4
|
|
|
Utterly Yorkshire and Forum/Wiki Editor Posts: 15,886 From: Devon UK |
|
|
|
|
Apr 3 2012, 07:48 AM
Post
#5
|
|
|
UtterAccess Addict Posts: 229 From: South Africa |
Hi
I have a bit of a problem. Ive been busy designing a form for my database - its a customer details/orders database. Im busy working on the customer details part of the database. As you can see my form is far from complete, I originally inserted 10 fictitous companies into the database to see if it worked as it was supposed to. However on closer inspection I see the amount of records (which should be 10) has increased to 30. They only reason that I can think of for this is because something got mixed up or something in the past. As I say I only noticed the problem today so I dont know if it was ever right. I have been thinking of possible causes and I worked out that all of my (10) records are somehow being repeated to give me 30 records. One of the "bits of information" that I am collecting from customers are addresses, there are 3 types (namely physical, postal and delivery addresses), hence 10 x 3 = 30. So I think this is the problem but I have no idea how to fix it - PLEASE HELP! My strategy for building my database is to work on one section at a time and thereby gain experience to build the later and I suspect more difficult sections. I am also trying to teach myself as I go along. My database |
|
|
|
Apr 3 2012, 08:03 AM
Post
#6
|
|
|
Utterly Yorkshire and Forum/Wiki Editor Posts: 15,886 From: Devon UK |
Hi
Your problem is because of the three address types that exist for each company, which means the query that you currently have as the record source for the form is producing 30 (10 companies x 3 address types) records. I've taken out the address types from the query (in the modified attachment) so that the query now returns just the 10 records you want. To get the addresses for each company, you'd generally use a subform which you'd add to the address tab of your tab control
Attached File(s)
|
|
|
|
Apr 3 2012, 08:05 AM
Post
#7
|
|
|
UtterAccess VIP Posts: 8,140 From: CT |
What makes you think that what you are seeing isn't correct? If you are thinking like it would look in an Excel worksheet that may be what is confusing you. If you have the address type, then some will have 1 address line and others may have 2 or 3. Far easier to work with in the future than having to search 3 different columns.
|
|
|
|
Apr 3 2012, 08:30 AM
Post
#8
|
|
|
UtterAccess Addict Posts: 229 From: South Africa |
Hi
Thanx for your help Alan, its showing the correct number of records now. I do want to add the addresses and other stuff but as sub forms. Also I dont understand what you did to fix it, I was under the impression that my form was based on the underlying tables and not a query @Bob G CT as in Cape Town, South Africa ? Im from Durban, South Africa, have lived in Cape Town and am now in Philippolis, Freestate, South Africa. |
|
|
|
Apr 3 2012, 08:46 AM
Post
#9
|
|
|
UtterAccess VIP Posts: 8,140 From: CT |
CT as in Connecticut, a smaller state in the U.S. Just east of New York.
|
|
|
|
Apr 3 2012, 08:50 AM
Post
#10
|
|
|
UtterAccess Addict Posts: 229 From: South Africa |
Sorry for the mix up.
|
|
|
|
Apr 3 2012, 08:50 AM
Post
#11
|
|
|
Utterly Yorkshire and Forum/Wiki Editor Posts: 15,886 From: Devon UK |
Hi
QUOTE I was under the impression that my form was based on the underlying tables and not a query You have as the record source for the form an SQL statement (ie a query), so that's the underlying recordset of the form, not the individual tables that make up the query. By removing the address types table from the query you're getting the records you're expecting as in effect it removed the x 3 multiplier |
|
|
|
Apr 3 2012, 09:00 AM
Post
#12
|
|
|
UtterAccess Addict Posts: 229 From: South Africa |
Let me understand this correctly.
Even though I didnt specifically make a query (to base the form on) a query was automatically created by Access showing the various fields from the various tables that I used to "compile" the form. What you did was go to the query (the record source for the form), the word at the beginning is SELECT (meaning its a select query), and you edited the reference to ADDRESS TYPES out of the query. Am I correct? I deduce that unless all the fields displayed on a form are from one underlying table the record source will be a query. This post has been edited by nickynoo: Apr 3 2012, 09:01 AM |
|
|
|
Apr 3 2012, 09:11 AM
Post
#13
|
|
|
Utterly Yorkshire and Forum/Wiki Editor Posts: 15,886 From: Devon UK |
Hi
You didn't create a saved query object as the recordsource for the form, that is you didn't create a new query and save it as an object and then use that as the forms recordsource, you clicked on the three little elipses which opened up the query builder. The query that you built wasn't saved as a separate query object, but it generated an SQL statement (which is actually a SELECT query) which was placed in the forms RecordSource property - that's the long text string you can see in there. You could just have easily created a separate query and bound the form to that which would have done the same thing. I removed the address type table from the query completely Make any sense ? Incidentally, just so you're aware, you probably wont be able to add/edit/delete records from the form as the query (recordsource) will be very likely not an updateable one |
|
|
|
Apr 3 2012, 09:29 AM
Post
#14
|
|
|
UtterAccess Addict Posts: 229 From: South Africa |
Hi
Heres what happened when I made the form. I saw it was base on a query (I deleted the query and saw the form didnt work). Then I created a new form with the same fields as in the originally form I had deleted. I opened a new form and went to that thing at the top in the ribbon that says ADD EXISTING FIELDS or something like that. I drag fields from the relevant tables onto the form. I think I mistakenly dragged addresstypes onto the form, I deleted the addres types field on the form - the query probably wasnt updated. And thats how I got the form. This updateable query thing - lets fix that up now. I have no idea that a query could be un-updateable. |
|
|
|
Apr 3 2012, 09:38 AM
Post
#15
|
|
|
Utterly Yorkshire and Forum/Wiki Editor Posts: 15,886 From: Devon UK |
Hi
QUOTE This updateable query thing - lets fix that up now. I have no idea that a query could be un-updateable. Yep, for lots of reasons. Have a look here for some info |
|
|
|
Apr 4 2012, 07:26 AM
Post
#16
|
|
|
UtterAccess Addict Posts: 229 From: South Africa |
Hi
Ive tried adding something to one of the form fields and it does seem to update the underlying table. |
|
|
|
Apr 4 2012, 07:36 AM
Post
#17
|
|
|
Utterly Yorkshire and Forum/Wiki Editor Posts: 15,886 From: Devon UK |
Hi
I guess you have an updateable query then (IMG:style_emoticons/default/wink.gif) I didn't check it, I just guessed it wouldn't be updateable due to the number of tables you have in the query which is why I said <<probably wont be able to add/edit/delete records>> (IMG:style_emoticons/default/wink.gif) |
|
|
|
Apr 4 2012, 07:41 AM
Post
#18
|
|
|
UtterAccess Addict Posts: 229 From: South Africa |
But if it happens in the future - how do I change it?
|
|
|
|
Apr 4 2012, 07:43 AM
Post
#19
|
|
|
Utterly Yorkshire and Forum/Wiki Editor Posts: 15,886 From: Devon UK |
Hi
Have a look at the link I posted in #15 above |
|
|
|
Apr 4 2012, 07:45 AM
Post
#20
|
|
|
Utterly Yorkshire and Forum/Wiki Editor Posts: 15,886 From: Devon UK |
........or this link to the info from Allen Browne
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 25th May 2013 - 09:40 AM |