help 
Author Message
 help

Hello,

I have an Access database (7 tables - they're connected, table #1 is main -
it is the name of factory, rest 6 tables have data about factory rooms,
machines etc.). However, at the start of my application (in VB 6), user
would have an option to choose new factory or to choose from older ones
(which already includes data). How could I do something like this:

<New>
ExistingFactory#1
ExistingFactory#2
...
ExistingFactory#n

User should click on one of this and then allow program to continue.

Any suggestion, link, ... please.

Thanks in advance,
Ivan.



Sun, 18 Apr 2004 01:57:54 GMT
 help

Hi Lomen,

It sounds like a Combo box control can help you here. First you can add a
"<NEW>" to the combo control, then retrieve Factory name from the database
and add them to combo control one by one. If the Combo control's Click
event, you can get the item user select. Below is a simple sample, you may
need to modify a lot based on your situation:

Private Sub Form_Load()

Combo1.AddItem "<NEW>"

Data1.DatabaseName = "d:\nwind.mdb"
Data1.RecordSource = "select distinct CompanyName from customers"
Data1.Refresh
Data1.Recordset.MoveFirst

Do While Not Data1.Recordset.EOF

Combo1.AddItem Data1.Recordset!CompanyName

Data1.Recordset.MoveNext

Loop

End Sub

Private Sub Combo1_Click()

If Combo1.Text = "<New>" Then

    'Add new company"
Else

End If

End Sub

Luke

(This posting is provided "AS IS" with no warranties, and confers no
rights. You assume all risk for your use. Copy Right, 2001 Microsoft
Corporation. All rights reserved.)



Sun, 18 Apr 2004 11:59:22 GMT
 help
Thanks Luke,
I found Yours example very usefull.

Ivan.



Wed, 21 Apr 2004 18:48:25 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. help,help,help,help,help,help,help,help,help,help,help,help,help,

2. Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,

3. help help help help help help help help help

4. SQL To ORACLE Help Help Help Help Help

5. query:HELP! HELP HELP HELP HELP

6. Help help help help

7. HELP HELP HELP HELP!

8. HELP HELP HELP HELP

9. NULL Values in SQL Queries - HELP HELP HELP...

10. HELP HELP HELP

11. backup HELP HELP HELP

12. Help Help Help -- long operations


 
Powered by phpBB® Forum Software