query editor

still_rookie

Registered User.
Local time
Today, 22:34
Joined
Apr 17, 2005
Messages
122
how can i make a query editor generate an SQL code which i can later insert into the Row Source of a combo box ?

thnks
 
Why do you have an aversion to the help files that accompany Access? :confused:
 
i dont, i looked there, but it says change to sql view. But i don't know how you got that code for me, cuz this 1 give the names of all the tables i inputed into the query... :(
 
still_rookie said:
i dont, i looked there, but it says change to sql view.

You can simply create a query in the Query Design grid, save the query, and then use the name of the query in the RowSource. You don't need to use the SQL or know SQL is even involved.

But i don't know how you got that code for me
I wrote it off the top of my head.
 
okay im sorry about that, but please listen to my problem here.

i am doing a coursework project for which i have a limited time scale. The perviously asked questions were not helped in the way i would have wanted. But, fortunatly, i have found all the answers to those. So now i would like the admin (whoever it is) to make a new forum, to post things such as these that i found, which included :
1.step by step instructions to make a log in form,
2.step by step instructions to enable pop up reminders

But as for this thread, i really don't use queries very much so i need the help stated above :o .. but this would be the final post like this from me.
 
still_rookie said:
So now i would like the admin (whoever it is) to make a new forum, to post things such as these that i found, which included :
1.step by step instructions to make a log in form,
2.step by step instructions to enable pop up reminders

Do you see those three forums at the top of the page? FAQ, Sample Projects, and Code Repository - that's what they are for. Their content, however, is solely based on contributions from the members here.
 
umm it does't seem to work.

i would like to ask SJ, how he got the code he gave me in the other forum, on how to add forms to the combo box.... Iwant to do it in the same fasion.... :confused:

BTW your name wouldn't be "Mike Year" by any chance?

Nopes. Im a school student in Kuwait. My name is Gaurav :) year 12 sir.
 
thanks for the database.

My question:

What is WHEREType??

and how dd you get it's value as -32768 ??? You also put it in the criteria box... where did you get this from ?? :confused:

Also, there is no table called MSysObjects, but the dialog box still opens asking fields :confused: ...

could you please please (pleading :( ) give me some of your time and explain this to me ? and also explain how do i get my tables into a combo box pleease.

thanks so much !
 
MSysObjects is a system table that you shouldn't mess around with. You can see a bunch of these by going to Options -> Show System Tables, and Show Hidden Tables.
 
as i hold the promise of this being the last undeciplined thread from me, i cant still break the rules on this thread :p ...

So PLEASE get back to me ASAP please :D
 
i have 6 tables, named as:

Accidents
Car_Details
Employee_Details
Fuel_Details
Service
Transaction

please if some one could give me an SQL code to put into the combo box's Row Source...

thanks a lot!
 
ohkay sorry about that...

what i did was opened the query, added all the tables and opened SQL view. Copied the code and put it in row source.

Was that the right way ??? :confused:
 
here you go..

Code:
SELECT Accidents.*, Car_Details.*, Employee_Details.*, Fuel_Details.*, Service.*, Transaction.*
FROM Employee_Details, (((Accidents INNER JOIN Car_Details ON Accidents.[Car Number]=Car_Details.[Car Number]) INNER JOIN Fuel_Details ON Accidents.[Car Number]=Fuel_Details.[Car Number]) INNER JOIN Service ON Accidents.[Car Number]=Service.[Car Number]) INNER JOIN [Transaction] ON Accidents.[Car Number]=Transaction.[Car Number];
 
im sorry but thats wat i got :( ... i put the tbales in the query, and then sql mode... if thats wrong can u give me step by step instructions ?? please ??

thanks a lot !
 
hehe itz okay... so .. now ?? this doesn;t seem to work ...
 
umm.. i dont want any fields, i want the tables itself... i want to open tables from a combo box. for that i need row source/ sql code for the tables...

so thats why i don't know wat to remove and what to keep :confused:
 
ok ill try:

i want to make a combo box, which list tables and when i click on any, it should open. i can handle the VB code, but i need the sql to list the tables in the combo box...

is that any better ??? :o
 
Gee whiz, just viewing this thread is painful. Can I jump in? Have to agree that giving users access to tables in not normally the way to go and spells potential disaster. It 'could be' something I might want if I were both the creator and user of the database.

This SQL, copied/pasted as the rowsource for your combo box (name it cboObjects) will return all table names, including those of linked tables.
Code:
SELECT
    msysObjects.Name
FROM
   msysObjects
WHERE
   ((Left([name],4)<>"MSys") 
AND
   ((msysObjects.Type) In (1,6)))
ORDER BY
   msysObjects.Name;

This, inserted as the AfterUpdate event of cboObjects, will open the selected table.
Code:
Private Sub cboObjects_AfterUpdate()

   docmd.OpenTable Me.cboObjects, acViewNormal

End Sub

Please give it a shot before posting back.

Bob
 

Users who are viewing this thread

Back
Top Bottom