473,385 Members | 1,912 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Help with MSysObjects problem please..

I have a form which contains a field that collects the MSysObjects list of queries within the system.

Also on this form there is a button that is told to apply the query chosen by the user to a certain second form, however I cant seem to tell the button to select the object.

Currently I have:

SELECT MSysObjects.Name FROM MSysObjects WHERE (((MSysObjects.Name)=Me![Choose Filter]))

Anyone help please !

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #1
2 4370
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The SQL I use to get the names of all the queries in an .mdb is:

SELECT MSysObjects.Name
FROM MSysObjects
WHERE (((Left("Name",1))<>"~") AND ((MSysObjects.Flags)<>3 And
(MSysObjects.Flags)<>268435459) AND ((MSysObjects.Type)=5))
ORDER BY MSysObjects.Name;

You can put this in the RowSource property of a ComboBox (remember to
set the RowSourceType to Table/Query). Then in the ComboBox's
AfterUpdate event you can run the query the user selected:

Private Sub cboQueries_AfterUpdate()

If Not IsNull(Me!cboQueries) Then
DoCmd.OpenQuery Me!cboQueries
End If

End Sub

Make sure the bound column of the ComboBox is 1.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQfAUOIechKqOuFEgEQI/rACgt7s3iLgZk8LQiwLaMRM5u6BrjVAAoKLM
CEmzpasyRwo7sat9LbaEmYy6
=Qifo
-----END PGP SIGNATURE-----
Simon Radford via AccessMonster.com wrote:
I have a form which contains a field that collects the MSysObjects list of queries within the system.

Also on this form there is a button that is told to apply the query chosen by the user to a certain second form, however I cant seem to tell the button to select the object.

Currently I have:

SELECT MSysObjects.Name FROM MSysObjects WHERE (((MSysObjects.Name)=Me![Choose Filter]))

Anyone help please !

Nov 13 '05 #2
To date I have set the following as an option instead of a button as I cant seem to find
and answer to the button issue.

I have set this as an after update event on the combo box itself
to set the focus on a second form, apply the filter chosen in combo box of the first form
then set the focus back to the original first form.

This does not apply the MYsysObects filter chosen from the combo box either, but I think
I am getting closer to a solution.
Private Sub Choose_Filter_AfterUpdate()
Forms![Contacts].SetFocus
DoCmd.ApplyFilter " & [Search Filter].[Choose Filter] & " '"
Forms![Search Filter].SetFocus
End Sub

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Craig Keightley | last post by:
Please help, i have attached my page which worksin IE but i cannnot get the drop down menu to fucntion in firefox. Any one have any ideas why? Many Thanks Craig ...
6
by: Bernd Koehler | last post by:
Hi: I am a EE prof currently teaching an IT course. One the assignments students recently completed was designing a small MS Access Database. I have two submissions that are remarkably...
1
by: irene2001 | last post by:
I have this cadastre table: ID_REAL ESTATE ID_OWNER SHEET NUMBER SUB 649564 934248 18 242 4 649564 1131665 18 242 4 I need to achieve only one record...
0
by: Frank Thiel | last post by:
Hello, we write into an MSACCESS 2.0 DB. These files are on a server. We get crashes and when I try to repair the corrupt DB I get messages like : one or more entries in MSysObjects (...
1
by: Roberto La Forgia | last post by:
Hi all, there is a utility o procedure to recovery deleted record from a Access table (versione 2002/2003) ? Thanks in advance Roberto
0
by: pnovreske | last post by:
I am dealing with a legacy VB6 app that has an Access backend. The db contains a linked table. I need to be able to edit the field (MSysObjects.Database) that contains the location of the...
1
by: Paul H | last post by:
Each time I run the user-level security wizard to create an mdw for my database I have noticed the following issue... Once I have run the wizard, I close the database and open the .mdw file I...
3
by: Proaccesspro | last post by:
I have a query that uses msysobjects to obtain the names of every report contained in a database. With that, I populate a listbox. The problem is, I guess at one time I created a couple of...
3
by: ARC | last post by:
I'm having trouble here with Access 2007 and connecting to a different database. The code below works great IF the previous back-end database connection is still present and you are trying to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.