1743e how to use a combo box result in a sub form combo box / query
Sign Up |  Live StatsLive Stats    Articles 37,330| Comments 177,248| Members 19,410, Newest Julian| Online 366
Home Contact
 (Forgotten?): 
    Sikhism
    For best SPN experience, use Firefox Internet Browser!


                                                                   Your Banner Here!    




Click Here to Register/Sign Up Daily Hukamnama Member Blogs Downloads Website Navigation Help Fonts Tags
Sikh Philosophy Network » Sikh Philosophy Network » Current News » Information Technology » how to use a combo box result in a sub form combo box / query

how to use a combo box result in a sub form combo box / query

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 500 USD, Received: 115 USD (23%)
Please Donate...
     
Related Topics...
Thread Thread Starter Forum Replies Last Post
RE: Parameter query using combo box in a form - option to select a IM4Jayhawks Information Technology 5 28-Jul-2006 08:33 AM
Updating Query from Combo box in a Form Kate Information Technology 0 28-Jul-2006 08:31 AM
Update Query from combo box on Form Kate Information Technology 0 28-Jul-2006 08:31 AM
How to create a table & form based on the result of several Combo Accessidiot Information Technology 2 28-Jul-2006 08:18 AM
RE: Parameter query using combo box in a form - option to select a Rawknee Information Technology 2 28-Jul-2006 08:03 AM


Tags
combo, box, result, sub, form, query
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:32 AM
Rabbie Williams's Avatar Rabbie Williams
Guest
 
Posts: n/a
   
   
how to use a combo box result in a sub form combo box / query

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
I'm trying to add some more complex functionality to a database that i've set
up but wonder whether it is beyond my scope and whether I need to seek
professional help.

The database is a medical reps call report. The user selects the hospital
he has visited on the main form. A continuous sub form is used to display
the individuals of that hospital that he has seen. The sub form has a combo
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/12860-how-use-combo-box-result-sub.html
box where the user selects the individual. I would like the sub form combo
box to show only those individuals who are associated with the particular
hospital selected rather than all the individuals of all hospitals who number
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12860
thousands.

I presume I need to delve into VBscript; to add the hospital name to a
variable. But how do I get the query (which is used by the sub form combo
box) to read this variable - is it possible and if so, what is the syntax?

Many thanks for any help.

S Miller


Got anything to share on This Topic? Why not share your immediate thoughts/reaction with us! Login Now! or Sign Up Today! to share your views... Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:32 AM
Al Camp's Avatar Al Camp
Guest
 
Posts: n/a
   
   
Re: how to use a combo box result in a sub form combo box / query

Rabbie,
On your main form, you should... beside the HospitalName... have a HospitalID (key
unique value)
This value should be the Parent/Child link between the main and the sub. (Your sub
records should also have a HospitalID) so that they will be linked to the main at all
times.
Use that sub HospitalID as a criteria in your sub combo box, so that only personnel
with the associated HospitalIDs will be listed for selection.

Only rep records with the associated HospitalID will show in the subform, and only reps
with that ID can be selected from the combo, as susequent visits occur.

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


"Rabbie Williams" Williams@discussions.microsoft.com> wrote in message
news:FD2F9E92-9F2B-4024-86FF-6300AE77733E@microsoft.com...
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12860
> I'm trying to add some more complex functionality to a database that i've set
> up but wonder whether it is beyond my scope and whether I need to seek
> professional help.
>
> The database is a medical reps call report. The user selects the hospital
> he has visited on the main form. A continuous sub form is used to display
> the individuals of that hospital that he has seen. The sub form has a combo
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12860
> box where the user selects the individual. I would like the sub form combo
> box to show only those individuals who are associated with the particular
> hospital selected rather than all the individuals of all hospitals who number
> thousands.
>
> I presume I need to delve into VBscript; to add the hospital name to a
> variable. But how do I get the query (which is used by the sub form combo
> box) to read this variable - is it possible and if so, what is the syntax?
>
> Many thanks for any help.
>
> S Miller



Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:32 AM
Rabbie Williams's Avatar Rabbie Williams
Guest
 
Posts: n/a
   
   
Re: how to use a combo box result in a sub form combo box / query

Unfortunately this doesn't work as hospitalID isn't the primary key - there
may be multiple call reports per hospital for every visit.

With my (albeit limited) programming knowledge what I think is required is
that the query from which the sub form combo is created, need to access the
main form combo result e.g.

SELECT Hospitals.AddressID, Hospitals.Name,
Individuals_area3.ContactLastName, Individuals_area3.ContactFirstName,
Individuals_area3.contactID
FROM Hospitals INNER JOIN Individuals_area3 ON
Hospitals.AddressID=Individuals_area3.AddressID
WHERE (((Individuals_area3.AddressID)=(Combo22.theResult )));

Though this level of functionality may be beyond me.

Cheers,

S Miller

"Al Camp" wrote:

> Rabbie,
> On your main form, you should... beside the HospitalName... have a HospitalID (key
> unique value)
> This value should be the Parent/Child link between the main and the sub. (Your sub
> records should also have a HospitalID) so that they will be linked to the main at all
> times.
> Use that sub HospitalID as a criteria in your sub combo box, so that only personnel
> with the associated HospitalIDs will be listed for selection.
>
> Only rep records with the associated HospitalID will show in the subform, and only reps
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12860
> with that ID can be selected from the combo, as susequent visits occur.
>
> --
> hth
> Al Camp
> Candia Computer Consulting - Candia NH
> http://home.comcast.net/~cccsolutions
>
>
> "Rabbie Williams" Williams@discussions.microsoft.com> wrote in message
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12860
> news:FD2F9E92-9F2B-4024-86FF-6300AE77733E@microsoft.com...
> > I'm trying to add some more complex functionality to a database that i've set
> > up but wonder whether it is beyond my scope and whether I need to seek
> > professional help.
> >
> > The database is a medical reps call report. The user selects the hospital
> > he has visited on the main form. A continuous sub form is used to display
> > the individuals of that hospital that he has seen. The sub form has a combo
> > box where the user selects the individual. I would like the sub form combo
> > box to show only those individuals who are associated with the particular
> > hospital selected rather than all the individuals of all hospitals who number
> > thousands.
> >
> > I presume I need to delve into VBscript; to add the hospital name to a
> > variable. But how do I get the query (which is used by the sub form combo
> > box) to read this variable - is it possible and if so, what is the syntax?
> >
> > Many thanks for any help.
> >
> > S Miller

>
>
>

Reply With Quote
  #4 (permalink)  
Old 28-Jul-2006, 08:32 AM
Al Camp's Avatar Al Camp
Guest
 
Posts: n/a
   
   
Re: how to use a combo box result in a sub form combo box / query

  Donate Today!  
Well, I can't say that I would go along with using an AddressID as the key field, but
let's put that aside.
If you have a field on the main form that can be used to limit the selections in the
subform combo, then you would use this "example" as a criteria in your sub combo. (use
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12860
your own object names)
= Forms!frmYourMainForm!SomeFieldThatLimitsTheRepsDi splayed
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

"Rabbie Williams" wrote in message
news:C32298C2-36B3-4EB9-92CC-94AD24A1788E@microsoft.com...
> Unfortunately this doesn't work as hospitalID isn't the primary key - there
> may be multiple call reports per hospital for every visit.
>
> With my (albeit limited) programming knowledge what I think is required is
> that the query from which the sub form combo is created, need to access the
> main form combo result e.g.
>
> SELECT Hospitals.AddressID, Hospitals.Name,
> Individuals_area3.ContactLastName, Individuals_area3.ContactFirstName,
> Individuals_area3.contactID
> FROM Hospitals INNER JOIN Individuals_area3 ON
> Hospitals.AddressID=Individuals_area3.AddressID
> WHERE (((Individuals_area3.AddressID)=(Combo22.theResult )));
>
> Though this level of functionality may be beyond me.
>
> Cheers,
>
> S Miller
>
> "Al Camp" wrote:
>
>> Rabbie,
>> On your main form, you should... beside the HospitalName... have a HospitalID (key
>> unique value)
>> This value should be the Parent/Child link between the main and the sub. (Your sub
>> records should also have a HospitalID) so that they will be linked to the main at all
>> times.
>> Use that sub HospitalID as a criteria in your sub combo box, so that only personnel
>> with the associated HospitalIDs will be listed for selection.
>>
>> Only rep records with the associated HospitalID will show in the subform, and only
>> reps
>> with that ID can be selected from the combo, as susequent visits occur.
>>
>> --
>> hth
>> Al Camp
>> Candia Computer Consulting - Candia NH
>> http://home.comcast.net/~cccsolutions
>>
>>
>> "Rabbie Williams" Williams@discussions.microsoft.com> wrote in message
>> news:FD2F9E92-9F2B-4024-86FF-6300AE77733E@microsoft.com...
>> > I'm trying to add some more complex functionality to a database that i've set
>> > up but wonder whether it is beyond my scope and whether I need to seek
>> > professional help.
>> >
>> > The database is a medical reps call report. The user selects the hospital
>> > he has visited on the main form. A continuous sub form is used to display
>> > the individuals of that hospital that he has seen. The sub form has a combo
>> > box where the user selects the individual. I would like the sub form combo
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12860
>> > box to show only those individuals who are associated with the particular
>> > hospital selected rather than all the individuals of all hospitals who number
>> > thousands.
>> >
>> > I presume I need to delve into VBscript; to add the hospital name to a
>> > variable. But how do I get the query (which is used by the sub form combo
>> > box) to read this variable - is it possible and if so, what is the syntax?
>> >
>> > Many thanks for any help.
>> >
>> > S Miller

>>
>>
>>



Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Active Discussions
Man Driving Without...
Today 05:06 AM
5 Replies, 95 Views
Request for assistance...
Today 04:24 AM
8 Replies, 63 Views
Losing My Religion: Why...
Today 03:03 AM
13 Replies, 307 Views
Black Sikhs?
By Alisa
Today 02:52 AM
19 Replies, 5,703 Views
Health Exercise And...
Today 02:10 AM
1 Replies, 70 Views
Sikh Spokesman (ਪੰਜਾਬੀ...
Today 02:10 AM
176 Replies, 4,494 Views
How Religions Change...
Today 02:07 AM
1 Replies, 94 Views
Keeping Amrit Vela
Today 01:57 AM
11 Replies, 881 Views
Rozana Reports (ਪੰਜਾਬੀ...
Today 01:52 AM
313 Replies, 7,570 Views
Do you believe in...
Today 00:25 AM
192 Replies, 4,014 Views
How does Sikhi help you...
Yesterday 22:54 PM
22 Replies, 884 Views
Panjabi
By Ishna
Yesterday 17:56 PM
12 Replies, 263 Views
Parkash Guru Amar Das ji...
Yesterday 17:07 PM
3 Replies, 42 Views
Serious challenges to...
Yesterday 16:49 PM
0 Replies, 101 Views
Sikh man fights for his...
Yesterday 16:46 PM
0 Replies, 75 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.3
All times are GMT +6.5. The time now is 05:47 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.46121 seconds with 32 queries
0