Need help with tab control

Bee

Registered User.
Local time
Today, 21:56
Joined
Aug 1, 2006
Messages
487
Hi,

I have used a tab control to create some forms. However, I can't modify or delete any of the information. It's seems like the forms are just read-only.

How can I change it so that I can modify and delete info please?

Thanks in advance.
 
Tab control has nothing to do with form's editability.

You should be looking at form's property (Data tab)

1) Are editing, addition, deletions allowed?

2) Is Data Entry set to No?

3) Is it based on a query? If so, is the query updatable?
 
I right hand cliked on form and checked on the property, but it's abviously not what you meant?

How can I display the form property please? I am not using a query and I am using MS Access 2000.

Thanks.
:)
 
Make sure the database is not set to read only. If you right click on the .mbd file and look at the properties and make sure there is no tick next to read-only.

Or

Start Microsoft Access and then select Open, browse to the file you wish to open select it then just next to the open button you will see a small black arrow head facing downwards. Click this and select open. to make sure it is not opening as read only.

The other more likely solutions are the ones Banana gave you above in his post.
 
The database is not set to read only. All properties above are set to YES.
The form is made of a query. Whenever, i try entering data it says: The recordset is not updeatable.

Does anyone know how to make it updatable please?

The help topics don't cover this I think.

Thanks.
 
Sounds like your query is the problem, go into the query and see if you can enter data dierctly into it, rather than the form.

My guess would be that you are unable to enter records this way either, which means that your query is the problem.

Have you based your query on more than on table?
 
*Pete* said:
Sounds like your query is the problem, go into the query and see if you can enter data dierctly into it, rather than the form.

My guess would be that you are unable to enter records this way either, which means that your query is the problem.

Have you based your query on more than on table?
That's right. My query is based on more than one table. The same message comes up when I try to enter data into the query directly.

In fact, I have not created the query myself, it was created by the form's wizard. I used it to create a massive form which is made from different tables.

Is there any way to fix this please? or do you think it's totally wrong?
Thanks.
 
I have found out what was wrong with my form. Access does not support "Editing" forms that are based on more than 3 tables if there is a many to one/one to many relationship amongst tables.

I really need to have all of my tables on one form using a tab control. Has anyone of you ever come across a similar problem?

It will be very much appreciated if anyone can help please.
Thank you,
Bee
 
Strictly, it's not about how many tables you have in a query. It's about how they are related. Not all queries are updatable.

Search the forums using keyword updatable query and you will get more information on how to make it updatable.

HTH.
 
I found out how to update my query. I needed to change the recordset type to dynaset inconsistent update.

Thanks for your help guys.
 
Bee,

Are you absolutely sure you want to do that? Do you understand that it may cause RI violations, much more especially if there will be several users using the database. Usually I have found a way around that by finding the right combination of updatable query and/or using subforms. Never had to use inconsistent updates.
 
Banana said:
Bee,

Are you absolutely sure you want to do that? Do you understand that it may cause RI violations, much more especially if there will be several users using the database. Usually I have found a way around that by finding the right combination of updatable query and/or using subforms. Never had to use inconsistent updates.
What do you mean by RI? I am very confused here. Basically, I want to use a tab in a form that can update tables and view them. Is it possible to be done in another way?
I don't think I need a query since the query selects what information to view.

Thanks in advance.
 
RI=Referential Integrity or in laymen's terms: Rules that won't let me muck up the data in database.

I'm saying that using inconsistent updates may create records that would be invalid because they lack a parent record or something like that. You would have to write lot of VBA code to keep the records properly synchronized when using inconsistent updates.

When you realize that using subform means you're using Access to keep everything synchronized for you, all for "free", without using VBA codes, which could be buggy or problematic, it really doesn't make any sense to use an inconsistent update.

Query are good if you want to have more than just one table and be able to update them on one form. Again, that will depend whether it can be updatable or not. If it's not possible, subforms usually does the job just fine.

You realize you can place a subform on a tab page, correct?
 
Banana said:
RI=Referential Integrity or in laymen's terms: Rules that won't let me muck up the data in database.

I'm saying that using inconsistent updates may create records that would be invalid because they lack a parent record or something like that. You would have to write lot of VBA code to keep the records properly synchronized when using inconsistent updates.

When you realize that using subform means you're using Access to keep everything synchronized for you, all for "free", without using VBA codes, which could be buggy or problematic, it really doesn't make any sense to use an inconsistent update.

Query are good if you want to have more than just one table and be able to update them on one form. Again, that will depend whether it can be updatable or not. If it's not possible, subforms usually does the job just fine.

You realize you can place a subform on a tab page, correct?
True. Is it possible to have a lot of sub forms or is there restricting rules?
 
You can only have two subforms "deep"; e.g.

Code:
Form
   SubForm1
      SubForm2

However, you can have unlimited numbers of "sibling forms"

Code:
Form
Subform1   Subform2  Subform3 ....
 
Banana,
My acXP help system says you can nest subforms up to 7 levels deep. I know I've been at least 4 levels deep myself. Just thought you'd like to know. :p
 
Banana said:
You can only have two subforms "deep"; e.g.

Code:
Form
   SubForm1
      SubForm2

However, you can have unlimited numbers of "sibling forms"

Code:
Form
Subform1   Subform2  Subform3 ....
"Siblings" is what I will try to do.
I am wanting to use this method as an alternative to what I was trying to do before with that query. Will it be a good practice to use one Form and sub forms to view, edit and change data on different tables?
 
RuralGuy said:
Banana,
My acXP help system says you can nest subforms up to 7 levels deep. I know I've been at least 4 levels deep myself. Just thought you'd like to know. :p

Really? That's news to me. Is that specific to 2002? I'm asking because several other places I've been at usually say that subforms can be nested 2 deep.

Nonetheless thanks for the tidbit of info! :)

Bee said:
"Siblings" is what I will try to do.
I am wanting to use this method as an alternative to what I was trying to do before with that query. Will it be a good practice to use one Form and sub forms to view, edit and change data on different tables?

As matter of fact, I have my forms all on single "container" form with each tab page holding a subform and it works nicely for that purpose.

Be aware that there will be a hit in performance when you load the form, as you would be pulling several recordsets for each subform embedded. There are ways around that, though.
 
Last edited:
Banana said:
Really? That's news to me. Is that specific to 2002? I'm asking because several other places I've been at usually say that subforms can be nested 2 deep.

Nonetheless thanks for the tidbit of info! :)



As matter of fact, I have my forms all on single "container" form with each tab page holding a subform and it works nicely for that purpose.

Be aware that there will be a hit in performance when you load the form, as you would be pulling several recordsets for each subform embedded. There are ways around that, though.
Nice to hear it's possible because I want to put them all in a single container and use a tab control to switch between them.

"Hit in performance" did you mean in relation to time, Will it function slower?
How can that be avoided please?
 
Hit in performance as in slower loading time. This can be remedied by initially setting all subforms on other tabs that aren't visible recordsource to nothing as below,
Code:
MySubForm.RecordSource =""

Then whenever a user click on other tab, use On Change event to "load" the recordsource for that subform on the tab.

Code:
Select Case TabCtl10.Value

Case 0

'First Tab
MySubform1.Recordsource = Something

Case 1

'Second Tab

MySubForm2.Recordsource = Something Else

End Select

There's more, but that is all I have off the top of my head. Search around for more hints.

This spreads out the loading until users actually need that subform on that tab. No need to unload the subforms as performance isn't really affected (unless you have less than 32MB of RAM. ;) ).

HTH.
 

Users who are viewing this thread

Back
Top Bottom