combo box (1 Viewer)

still_rookie

Registered User.
Local time
Today, 09:09
Joined
Apr 17, 2005
Messages
122
hey guys..

anyway i can add forms to a combo box, and then program it through VB or something to open the form clicked on?
 

Mile-O

Back once again...
Local time
Today, 07:09
Joined
Dec 10, 2002
Messages
11,316
You can use the following SQL:

SELECT Name
FROM MSysObjects
WHERE Type = -32768
ORDER BY Name;
 

ColinEssex

Old registered user
Local time
Today, 07:09
Joined
Feb 22, 2002
Messages
9,175
or you could use a ListBox.

Do any of your forms rely on another form being opened first? (like Customers then Orders)

Col
 

Mile-O

Back once again...
Local time
Today, 07:09
Joined
Dec 10, 2002
Messages
11,316
What are you actually using? VB or VBA
 

still_rookie

Registered User.
Local time
Today, 09:09
Joined
Apr 17, 2005
Messages
122
Do any of your forms rely on another form being opened first? (like Customers then Orders)

yeah.. when the file opens in access... a form opens asking to log into (got it finally ;) and will post it here for ppl like me) then the main menu opens in which i want to include this. But besides this, no forms rely on others.

What are you actually using? VB or VBA

Im using the visual basic in accessxp.....i dont know anything besids that :eek:
 

still_rookie

Registered User.
Local time
Today, 09:09
Joined
Apr 17, 2005
Messages
122
hey sorry but i don't know how to use sql commands, can you please help ?

what comes after 'name' and what is 'WHERE Type = -32768' :(
 

Mile-O

Back once again...
Local time
Today, 07:09
Joined
Dec 10, 2002
Messages
11,316
still_rookie said:
hey sorry but i don't know how to use sql commands, can you please help ?

Sure. Click here

Put the SQL I gave into your combo's RowSource.
 

still_rookie

Registered User.
Local time
Today, 09:09
Joined
Apr 17, 2005
Messages
122
hey thanks soooo much for the sql code... thats the 1st thing that actually helped me on this site...

anyway .... but ... theres 1 problem... the forms are only listed ... they don't open ... can you please help me on this 1 too ??

thanks in advance !
 

Mile-O

Back once again...
Local time
Today, 07:09
Joined
Dec 10, 2002
Messages
11,316
Use the combo's AfterUpdate event, select the ... and pick Code Builder.
In the module put the following, replacing MyCombo with the name of your combobox.

Code:
If Not IsNull(Me.MyCombo) Then
    DoCmd.OpenForm Me.MyCombo
End If
 

still_rookie

Registered User.
Local time
Today, 09:09
Joined
Apr 17, 2005
Messages
122
GOT IT ! .. THANKS SOOO MUCHH !
 
Last edited:

still_rookie

Registered User.
Local time
Today, 09:09
Joined
Apr 17, 2005
Messages
122
sorry abt this but can you give me the sql code for getting data from the tables too ?
 

Mile-O

Back once again...
Local time
Today, 07:09
Joined
Dec 10, 2002
Messages
11,316
Use the query editor. That generates the SQL for you.
 

Users who are viewing this thread

Top Bottom