Dual Combo Boxes (1 Viewer)

n00b

Registered User.
Local time
Today, 06:42
Joined
Jan 28, 2003
Messages
12
I would like to start by saying Thanks to the moderator and creator of this site to help new people out with some help .

about my Question its is regd dual combo boxes i have searched the forums for the answer found similiar replies but not exactly what i am looking for here is my question now

db combo1
db combo2

db combo 1 load up the Beverage Table

on change since it does not have update option i want it to refill or refresh dbcombo2 to show the different beverages for example

if dbcombo1=Beer then dbcombo2 should show

Beck
heineken
MGD ... Etc


and then underneath it all i have the dbgrid where it should show the description of the product chosen..i found the cascade dbcombo example its close but not what i am looking for any feedback regarding this question would be really appreciated . Thanks
 

k209310

Registered User.
Local time
Today, 06:42
Joined
Aug 14, 2002
Messages
185
Do you have the data refering to the different beverages in tables or do you need to add them by hand using VBA code?
 

n00b

Registered User.
Local time
Today, 06:42
Joined
Jan 28, 2003
Messages
12
Yes k209310 The data is coming from Two Separate Table one for Beverages and the other for the different brands of beverages along with description.
 

sambo

Registered User.
Local time
Yesterday, 22:42
Joined
Aug 29, 2002
Messages
289
Try this out..
Notice the After Updat Event of both combo boxes.
Also, notice the Row Source of the combo boxes. Including a criteria in the second box is how you get the two boxes to relate to each other.
Remember to requery the second box after updating the first..

Good Luck..
 

Attachments

  • casccombo.zip
    23.4 KB · Views: 171

n00b

Registered User.
Local time
Today, 06:42
Joined
Jan 28, 2003
Messages
12
Thank you Sambo for your respone and example it was very helpful in explaining me on how to query i think i forget to mention that the application i am creating is going to be on VB with a MS Access Database .... But thanks everyone for your help
 

n00b

Registered User.
Local time
Today, 06:42
Joined
Jan 28, 2003
Messages
12
I got a few other Questions for helpful SouL

the Description and everything is going to fall in a DB Grid in this Project

1: How do i get the Value of Description in a Grid

example


Beverage : Kind : Description

Beer : Heineken : Refreshing without Hops
Water : Spring Water : Crystal clear spring water


Now i am trying to get the (description ) Value of Spring water

i can put

String =DbGrid.text but that will give me Beer or water as text not kind of description ??

also can i use that string in another form textbox ??

example i get this value from form1 grid and then i want to input this into form2 textbox.text

Textbox1.text=String

Thanks
 

sambo

Registered User.
Local time
Yesterday, 22:42
Joined
Aug 29, 2002
Messages
289
Was there a particular flaw in the example posted?
You are aware that this is an Access Forum??
 

n00b

Registered User.
Local time
Today, 06:42
Joined
Jan 28, 2003
Messages
12
No sambo there was absolutely no flaw in your example infact it was very nice and cleanly done for anyone to understand and it was after i d/l my first zip from you that i did completely realize that this is a all Access Forum .. i got the DbGrid problem covered now and i can use your example of the query to finish up my project ..Thanks
 

sambo

Registered User.
Local time
Yesterday, 22:42
Joined
Aug 29, 2002
Messages
289
Cool,
Did you say you were integrating MS Access with Visual Basic .NET?
If so, what is the benefit? Why not use one or the other?

Let us know if you need any more help.

Good Luck..
 

n00b

Registered User.
Local time
Today, 06:42
Joined
Jan 28, 2003
Messages
12
i am using Vb 6 pro with Access Database it was initially an ASP project given to me but after wasting few days and not getting anywhere i decided to use VB instead

Why you ask ? umm i got the all time famous answer for it " i dont know i just work here " lol

i know i am at the wrong forums more so the wrong thread but so i will just move this to VBA section
 
Last edited:

Users who are viewing this thread

Top Bottom