The name of the subform within the main form is whatever you want it to be. This is what I want to try and get.
The original post explains this.
I am trying to get to the name of the subform not the source object.
Thanks
I don't want to retrieve properties of the controls on the subform. I want to return the 'name' propery of the instance of the subform that is used on the mainform.
The code is in the subform. This is what makes it tricky I think.
Hope this helps.
I have placed a subform on a main form.
The name of the subform on the mainform is subform1.
The source object object for subform is subFormDetails
Within subformDetails I have some code running.
How do I retrieve what the subform is called on the mainform using code. The return value I want...
Ah, you are changing the 'filter' property of the form. I have had problmes with this too.
My favoured solution is have a query that is your search query. The form shows the results of the query and also changes the query definition.
When the form loads the form modifies the query to
'select...
In that case then,
I think your syntax is correct.
This is obvious but....
Is the query already open prior to opening the form? Otherwise open the query after the form.
Open the report last, while the form and query are still open
Good luck
Have you missed out the equals sign?
The line in the query should be
=[forms]![sacspecific]![brokers]
By the way,
If the sacspecific form actually shows the results of the query in a subform then you may need to refresh or requery the subform inorder that it shows the results of the query. To...
Sorry to be a bit stupid but could you give me more details about this fix.
By the way, why does the 'where' clause speed up the execution of query2 considering that all the processing is done on the local machine?
Thanks
I do not understand the following:
Query1 links many tables together and will show all the records
Query2 is a simple select query of query1 and only shows records related to a specific part
Query2 always runs faster (by a couple of seconds)than Query1. Why?
All the tables are in databases on...
The only method I can think of is to run a piece of code that stores all the fields that are duff into a string or an array(better). Then launch a message box (the constant vbCRLF will start a new line in a messagebox to make it more readable)or a custom form that has a list box on it populated...
Have you just upgraded from Access 97 to Access 2000?
Have your autonumbers reset in your tables?
The problem is that Access 2000 requires a patch in-order for it to compact a database without destroying it! The database gets compacted automatically when you convert the database from 97 to...
Sorry I forgot the following, I am using Access 97, all the tables are linked, the expressions are exactly as stated even down to the tables names.
Why should the expressions give different results?
The complete sql query expression is as shown above and they return a different number of records.
I suppose the expression builder is a 'red herring' though. The sql expression can be written (or built) as shown above to include the following line
from table1 inner join.....
or
from...
These two SQL queries return a different number of records. Why?
The 'From Tablen' expression varies depending where I start my join from in the Access expression builder. Why should this make a difference?
SELECT Table1.f4, Table2.f4
FROM Table1 INNER JOIN Table2 ON (Table1.f3 = Table2.f3) AND...
There are many ways to do this, here is another (though you may have it sorted now).
I often have a form that views all the records in an query. The query shows all the results of the search.
To change the search I type in a text string in the text box (txtSearch). I then trigger an event from...
I too have had problems like this. It v.annoying
Have you tried moving focus to a text box on FormA, then disabling subformX, then loading FormB? Sorry if this is what you mean in (b) above.
goodluck
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.