Apr 2 2012, 05:56 AM
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.
Ocannot 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
Apr 2 2012, 06:09 AM
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 <
Apr 2 2012, 06:37 AM
Thankyou - will give it a shot
Apr 3 2012, 07:48 AM
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.
HAs 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.
Apr 3 2012, 08:03 AM
Y />our 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
Apr 3 2012, 08:05 AM
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
hanx 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
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
CT as in Connecticut, a smaller state in the U.S. Just east of New York.
Apr 3 2012, 08:50 AM
Sorry for the mix up.
Apr 3 2012, 08:50 AM
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
Let me understand this correctly.
ven 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?
Odeduce that unless all the fields displayed on a form are from one underlying table the record source will be a query.
Apr 3 2012, 09:11 AM
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.
Oremoved 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
eres 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
Yep, for lots of reasons. Have a look here
for some info
Apr 4 2012, 07:26 AM
ve tried adding something to one of the form fields and it does seem to update the underlying table.
Apr 4 2012, 07:36 AM
guess you have an updateable query then <
Odidn'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>> <
Apr 4 2012, 07:41 AM
But if it happens in the future - how do I change it?
Apr 4 2012, 07:43 AM
Have a look at the link I posted in #15 above
Apr 4 2012, 07:45 AM
........or this link
to the info from Allen Browne
Apr 4 2012, 10:14 AM
ollowing on from Alan's comments
See the modified Db attached
The Main form's Record Source is now based on tblCompanies and NOT a Select Query
The Subforms are based on their respective tablesClick to view attachment
Apr 4 2012, 10:54 AM
Hi, this is exactly what I want.
Thanks for all the help. An ungrateful person would pass this off as something they did themselves, but not me Ill be going through every little bit of what you have done - not only to figure out "how it all works" but also to gain much needed knowledge. Expect questions.
Apr 23 2012, 07:53 AM
Im back - sorry was sick and had family crisises to deal with.
Am uploading my database Ive had a bit of help from various people - thankyou.
What I am trying to do now is get the fields (that display on my main form) to display the correct information and not just the numbers of the various "IDs" that I have got. If you look on my form I have a number in certain fields eg. 2 --- this means absolutely nothing to me, I need to see what a "2" in a particular field represents, also there are alot of these same type of "numbers" on my form.
Apr 26 2012, 01:29 AM
Please help me.
Apr 26 2012, 01:59 AM
On design view of the form, create comboboxes for each of the controls that are currently displaying numbers.
Use the Lookup table that corresponds to the control as the Record Source of the comboox.
For the control Status
The Record Source would be:
tblStatus.StatusID and tblStatus.Status
The width of the StatusID column should be 0"
Store StatusID in the corresponding control on the form StatusID
THere is a link to explain in more detail How to create a Combobox
Apr 26 2012, 08:14 AM
Thanks it seems so obvious now. I was really stressing about how I was going to do this, thankyou,
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here