Change subform default view

exaccess

Registered User.
Local time
Today, 07:13
Joined
Apr 21, 2013
Messages
287
I have a mainform with a listbox and a subform sitting in the mainform. The default view of mainform is single. The listbox displays a list of people. When the user clicks on a row of the listbox the subform shows detailed data about that person. The layout of the subform covers almost half of the area of the mainform. It works except that the subform automatically takes table view as if there were many records to display although it displays only the selected record. This automatic manipulation of the default view does not look good at all. Can somebody help please.
 
Is this a Split form? Or a Single Form? How did you create the SubForm? Drag and drop I presume? Try creating a SubForm based on the table. This will then give you the option to switch views.
 
Is this a Split form? Or a Single Form? How did you create the SubForm? Drag and drop I presume? Try creating a SubForm based on the table. This will then give you the option to switch views.

It is a single form. It is not split. I created it based on an existing single form. I shall now try your proposal. I'll report back.
 
I am trying to build up the subform from scratch. But it does not allow me to use the table name. In the wizard it does not display the name of the table. When I do it without the wizard by typing in manually the table as Source Object it says the object does not exist.
 
Are you able to see the table in the navigation-pane of the database?
 
Are you able to see the table in the navigation-pane of the database?

The answer is YES, but it is not visible in the wizard. In the meantime I have solved all the problems of assigning queries to mainform record source, mainform listbox row source and to subform source object. Now everything is working fine except for this single form business. I wonder if it has something to do with this source object of the subform???
 
Sound strange, if we are talking about the same thing and it sounds we are, (I've never seen such behaviour before).
The below points is only for troubleshooting, (one step at a time):

  • Do a "Compact and Repair"
  • Create a query on the problem table, (select it all, "Select * From YourProblemTableame". Look if the query appear in the Wizard, when you create a new form.
  • Make a copy of the problem table. Look if that table appear in the Wizard, when you create a new form.
  • Import all objects into a new database.
Else post a stripped version of your database, with some sample data (zip it) + info which table and form you've the problem.
 
Sound strange, if we are talking about the same thing and it sounds we are, (I've never seen such behaviour before).
The below points is only for troubleshooting, (one step at a time):

  • Do a "Compact and Repair"
  • Create a query on the problem table, (select it all, "Select * From YourProblemTableame". Look if the query appear in the Wizard, when you create a new form.
  • Make a copy of the problem table. Look if that table appear in the Wizard, when you create a new form.
  • Import all objects into a new database.
Else post a stripped version of your database, with some sample data (zip it) + info which table and form you've the problem.

Here we go: The sample data is in the backend. Put the two files in the same directory, then the linking is done automatically. you do not have to use the display or connect buttons. The word search is done using the letters given in all the text fields. This is a part of a rather sophisticated PIF system with interfaces to email clients, to contacts databases, to voipbuster, to calendars, web, clouds, mobile devices, etc.
 

Attachments

The subform isn't a real sub form, but a query with the name "SourceQy", (see attached picture).
Create a real subform using the Wizard you can use the query "SourceQy" as recordsource for the form or choose the table you want.
After you have create the subform, insert it into the mainform.
...Put the two files in the same directory, then the linking is done automatically...
Only for clarifying, the linking isn't done automatically, one reason therefore is because the Backend only has one table, while the Frontend has 4 table liked.
 

Attachments

  • Sub.jpg
    Sub.jpg
    56.5 KB · Views: 219
The subform isn't a real sub form, but a query with the name "SourceQy", (see attached picture).
Create a real subform using the Wizard you can use the query "SourceQy" as recordsource for the form or choose the table you want.
After you have create the subform, insert it into the mainform.

I have done exactly as you said. I took a blank form and created a subform. The record source can be chosen as a table. Sooner or later one has to define the subform control. In doing so when I specify SourceQy as Source Object the form becomes a datasheet. If I change the Source Object to another form or table it becomes a single form. So it does not work. Of course I need the SourceQy and the two link fields to identify the record to display. So I am frustrated am I trying to do something which is not possible?

Only for clarifying, the linking isn't done automatically, one reason therefore is because the Backend only has one table, while the Frontend has 4 table liked.

Sorry about that there are some tables linked which I had to suppress when placing the links.
 
Is the attached what you are looking for?
Otherwise explain in detail what result you want to get and what the form should be used for.
 

Attachments

Is the attached what you are looking for?
Otherwise explain in detail what result you want to get and what the form should be used for.
Well not exactly, nevertheless with the ideas that you gave I finally got what I wanted. The trick is to have the name of the form that is the parent of the subform as the Source Object. If the Source Object is a table or a query or a form that has the continuous format then this subform no matter what the design looks like defaults to datasheet. To overcome this I have used a form called EnterRecordFm which is a single form and is designed to have one record at a time based on a filter. I used this form as the Source Object to the subform control. Of course this form must have the linking field. Many thanks
 

Users who are viewing this thread

Back
Top Bottom