Simple question about showing tables in form

amator

Registered User.
Local time
Tomorrow, 01:17
Joined
Aug 1, 2006
Messages
23
Hi
I have a form which has two command buttons A and B. I set that when somebody click the button A then table A will be open and so on. But I dont want that table opens in new window. I want that I can "draw" a "box" in form where the table will showed. So can anybody help me and tell how to set that table will always show in "box". Can I set this somewhere in Access or do I have write VBA code. (I'am very very poor at coding)
 
You should not have users directly work on tables. You can create a subform based on a query of that table (just set the query for all fields using the asterisk) that will display in datasheet mode that will make it look like the table. Then, you can format the way it looks on the form and you can set the Visible property to NO until you want to show it.
 
Thanks. Now I have idea how to do it.
But how I set for the command button to show the subform(VBA or some settings). And if I want show another table in same place do I have "draw" a subform in same place?
 
You can either put both subforms in the same position and when you click a button set one to visible=yes, the other to visible=no
or
have one subform control and change its Source Object property

eg
Code:
procedure button1_onclick()
    subform1.SourceObject = "name of subform"
    subform1.Visible = Yes
end procedure
 
I maded it whit that visible=yes/no method. Maybe it wasn't the best solution but it work.
Thanks a lot
 

Users who are viewing this thread

Back
Top Bottom