Form Data Source 
July 3rd, 2008, 07:35 PM
| | | Form Data Source
I have 4 queries and all 4 queries use different tables and pull
different columns.
Is it possible to have one Generic all Purpose form (frmGeneral) and on
the fly at run time set frmGeneral's data source to any of these
queries:
qry1, qry2, qry3 or qry 4 before showing the form to the user?
Once the form is loaded and in view, can the data source be switched on
the fly if the users elects to see the results of another query? I
tried this but when designing the new form the next step was to drag
fields on to the form. I don't want to do this. I just want to change
data sources on the fly.
My whole reason for this is to cut down on maintenance and only have to
maintain one form instead of four near-duplicate-in-appearance forms.
Thanks.
*** Sent via Developersdex http://www.developersdex.com *** | 
July 3rd, 2008, 08:55 PM
| | | Re: Form Data Source
You can set the recordsource (any of your queries) in the open event of the
form with:
Select Case DecidingFactorForWhichQuery
Case Factor1 Value
Me.Recordsource = "NameOfQuery1"
Case Factor2 Value
Me.Recordsource = "NameOfQuery2"
etc ....
End Select
Then set the controlsource of controls on your form with:
Select Case DecidingFactorForWhichQuery
Case Factor1 Value
Me!Field1.ControlSource = "NameOfQueryField1"
Me!Field2.ControlSource = "NameOfQueryField2"
Me!Field3.ControlSource = "" ' Does not use field on form
Case Factor2 Value
Me!Field1.ControlSource = "" ' Does not use field on form
Me!Field2.ControlSource = "" ' Does not use field on form
Me!Field3.ControlSource = "NameOfQueryField3"
Me!Field4.ControlSource = "NameOfQueryField4"
etc ....
End Select
Steve
"RLN" <nospamrln@devdex.comwrote in message
news:1215113040_17757@news.newsfeeds.com... Quote:
>
>
I have 4 queries and all 4 queries use different tables and pull
different columns.
>
Is it possible to have one Generic all Purpose form (frmGeneral) and on
the fly at run time set frmGeneral's data source to any of these
queries:
qry1, qry2, qry3 or qry 4 before showing the form to the user?
>
Once the form is loaded and in view, can the data source be switched on
the fly if the users elects to see the results of another query? I
tried this but when designing the new form the next step was to drag
fields on to the form. I don't want to do this. I just want to change
data sources on the fly.
>
My whole reason for this is to cut down on maintenance and only have to
maintain one form instead of four near-duplicate-in-appearance forms.
>
Thanks.
>
>
*** Sent via Developersdex http://www.developersdex.com ***
| | 
July 3rd, 2008, 10:35 PM
| | | Re: Form Data Source
"Mark" <notmy@email.comschreef in bericht news:xLSdnUqUQd1VpvDVnZ2dnUVZ_q_inZ2d@earthlink.co m... Quote:
You can set the recordsource (any of your queries) in the open event of the
form with:
Select Case DecidingFactorForWhichQuery
Case Factor1 Value
Me.Recordsource = "NameOfQuery1"
Case Factor2 Value
Me.Recordsource = "NameOfQuery2"
etc ....
End Select
Then set the controlsource of controls on your form with:
Select Case DecidingFactorForWhichQuery
Case Factor1 Value
Me!Field1.ControlSource = "NameOfQueryField1"
Me!Field2.ControlSource = "NameOfQueryField2"
Me!Field3.ControlSource = "" ' Does not use field on form
Case Factor2 Value
Me!Field1.ControlSource = "" ' Does not use field on form
Me!Field2.ControlSource = "" ' Does not use field on form
Me!Field3.ControlSource = "NameOfQueryField3"
Me!Field4.ControlSource = "NameOfQueryField4"
etc ....
End Select
Steve |
--
Hey Mark/Steve!! We don't need you here !!
Hey Mark/Steve!! We don't want you here !!
This is to inform 'newbees' here about PCD' Steve: http://home.tiscali.nl/arracom/whoissteve.html (updated, mainly the 'abuse-reporting' page...)
Until now 5850+ pageloads, 3675+ first-time visitors
(these figures are real and rapidly increasing)
Why is this ???
Because Steve is the ONLY person here who continues to advertise in the groups.
It is not relevant whether he advertised in *this* particular post or not...
==We want him to know that these groups are *not* his private hunting grounds!
For those who don't like too see all these messages:
==Simply killfile 'StopThisAdvertising'.
Newbees will still see this warning-message.
ArnoR | 
July 4th, 2008, 01:25 AM
| | | Re: Form Data Source
And, of course, if you need to do any type of data validation or manipulation
in the controls' AfterUpdate events or the form's BeforeUpdate event, you'll
have to qualify these as well by identifying which record source is currently
being used.
I've got to tell you, long term, I think you'll find that you're going to
increase your time spent on maintenance, not decrease it.
--
There's ALWAYS more than one way to skin a cat!
Answers/posts based on Access 2000/2003
Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ccess/200807/1 | 
July 8th, 2008, 03:45 PM
| | | Re: Form Data Source
Thank you for your code sample here, Mark. I appreciate it.
RLN
*** Sent via Developersdex http://www.developersdex.com *** | 
July 9th, 2008, 09:05 AM
| | | Re: Form Data Source
You know, I think this idiot posted and answered his own question
under two alias's. Probably trying to build credibility. That was not
even half an answer to the question.
I read the page on this numbnut. Where is this idiot from anyway?
The Frog | 
July 9th, 2008, 10:15 AM
| | | Re: Form Data Source
"The Frog" <Mr.Frog.to.you@googlemail.comwrote in message
news:d21b9ad0-8675-445d-93fd-76fc0bf9844b@27g2000hsf.googlegroups.com... Quote:
You know, I think this idiot posted and answered his own question
under two alias's. Probably trying to build credibility. That was not
even half an answer to the question.
| Wouldn't be the first time. Quote:
>
I read the page on this numbnut. Where is this idiot from anyway?
>
| Google PC Datasheet. His web site is hilarious. "Tricks and Tips" have
been "coming soon" for about 5 years and one listed "qualification" is
"large selection of reference books".
Keith. | 
July 10th, 2008, 08:25 AM
| | | Re: Form Data Source
Hi Keith,
Yeah, the idiots website is a laugh. Its like some high school project
on 'What should your business look like'. I love the fact that the
'reference' named Geordie has no company or last name, or details of
any work done. This is just a fool with an ego bigger than its
abilities.
PA - is that Pennsylvania (hope I spelled it correctly)? Thats where
the company seems to be registered / operates from. I wonder what
types of rules and regulations they have about spamming? It (the
idiot) seems to want public exposure - perhaps it should have it!
Cheers
The Frog | 
July 10th, 2008, 10:05 AM
| | | Re: Form Data Source
TTBOMK, I was the first CDMA regular to clash with Steve. I criticized him
harshly.
Did this change Steve? No!
Did this diminish me? I believe that it did.
Perhaps, CDMA could have benefitted if I had been able to find a gentle way
to encourage and help Steve. I’m pretty sure I’d feel better about the
interchanges now if I had made a strong effort to do that.
The Frog <Mr.Frog.to.you@googlemail.comwrote in news:f9f7819f-5cc8-494d- 8f52-4ae1ada3fba3@t54g2000hsg.googlegroups.com: Quote:
Hi Keith,
>
Yeah, the idiots website is a laugh. Its like some high school project
on 'What should your business look like'. I love the fact that the
'reference' named Geordie has no company or last name, or details of
any work done. This is just a fool with an ego bigger than its
abilities.
>
PA - is that Pennsylvania (hope I spelled it correctly)? Thats where
the company seems to be registered / operates from. I wonder what
types of rules and regulations they have about spamming? It (the
idiot) seems to want public exposure - perhaps it should have it!
>
Cheers
>
The Frog
| | 
July 11th, 2008, 08:15 AM
| | | Re: Form Data Source
I hear what you are saying Lyle, and the sentiment is a good one. I am
all for people wanting to better themselves, and like you (although
not to nearly the same extent due to my limited experience) I try and
offer help through here to others.
I dont see 'Steve' doing this however. Maybe I am wrong, but I see
'phishing' taking place. Its sort of a 'Have a taste, I'm so
great....' rubbish followed with a 'oh, well, what do you know, I
guess I can answer that and help you out for "reasonable rates"'. To
me, thats just not in the spirit of helping others and sharing
knowledge. Perhaps this is why others are upset with him as well.
I dont mind if someone wants to genuinely contribute or learn, I am
happy to share what I have, and I benefit from the experience of
others in this group. I have learned much from here and as a result
the quality of my work has greatly improved. I for one am always
grateful for the advice of experienced others such as yourself, and
the other MVP's here, and of course SALAD!
This is not the case with the behaviour 'Steve' is demonstrating -
what he does masquerades as this, but it is by no means selfless and
seems motivated either to be cruel to the people asking questions or a
deceptive and smart-arsed form solicitation. Maybe I am wrong here,
but I call it how I see it.
Perhaps you are right, perhaps a gentler approach would be a better
way to go. I cannot however imagine that the result would be any
different than what you have already experienced because there is a
distinct lack of respect for anyone or anything except 'Steve's' own
private motivations.
Still, to play the victim here would be narcissistic. I for one will
simply watch the events unfold and enjoy the show. Perhaps I will even
take on the persona of one of those wonderful hecklers from 'The
Muppet Show' :-)
Cheers
The Frog | 
July 11th, 2008, 11:05 AM
| | | Re: Form Data Source
"The Frog" <Mr.Frog.to.you@googlemail.comschreef in bericht news:436c08c1-f51a-4df7-a8bb-293ad20e08c1@x41g2000hsb.googlegroups.com... Quote:
>I hear what you are saying Lyle, and the sentiment is a good one. I am
all for people wanting to better themselves, and like you (although
not to nearly the same extent due to my limited experience) I try and
offer help through here to others.
| Lyle has on several occasions initiated a 'different', 'gentler' route...
Check out the thread "Healing' for instance.
Unfortunately even that did not work... Quote:
I dont see 'Steve' doing this however. Maybe I am wrong, but I see
'phishing' taking place. Its sort of a 'Have a taste, I'm so
great....' rubbish followed with a 'oh, well, what do you know, I
guess I can answer that and help you out for "reasonable rates"'. To
me, thats just not in the spirit of helping others and sharing
knowledge. Perhaps this is why others are upset with him as well.
| Steve is not here to contribute, he is only here to 'fish' indeed.
He considers the groups as his private hunting-grounds
He even thinks he has the right to advertise, because he also answers some questions here. Quote:
I dont mind if someone wants to genuinely contribute or learn, I am
happy to share what I have, and I benefit from the experience of
others in this group. I have learned much from here and as a result
the quality of my work has greatly improved. I for one am always
grateful for the advice of experienced others such as yourself, and
the other MVP's here, and of course SALAD!
This is not the case with the behaviour 'Steve' is demonstrating -
what he does masquerades as this, but it is by no means selfless and
seems motivated either to be cruel to the people asking questions or a
deceptive and smart-arsed form solicitation. Maybe I am wrong here,
but I call it how I see it.
| You are not at all wrong. You are 100% right. Quote:
Perhaps you are right, perhaps a gentler approach would be a better
way to go. I cannot however imagine that the result would be any
different than what you have already experienced because there is a
distinct lack of respect for anyone or anything except 'Steve's' own
private motivations.
| We have tried gentle approaches several times.
Over the years it seems that *nothing* works to change Steve's attitude.
But he has been away several (long) times from the groups ==no advertising
Why has he been away ??
Because of the website ?? hmmm...maybe
Because of complaints to his ISP ?? Probably yes
I think so because he has changed from ISP several times (earthlink >supernews >giganews)
So what's left IMO is to try to get him out of here again; it is sad but true.
So: please complain to abuse@giganews.com (appropriate action will follow when there are enough complaints) Quote:
Still, to play the victim here would be narcissistic. I for one will
simply watch the events unfold and enjoy the show. Perhaps I will even
take on the persona of one of those wonderful hecklers from 'The
Muppet Show' :-)
Cheers
The Frog
| More to come ?? We'll see
Arno R | | Thread Tools | Search this Thread | | | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 220,662 network members.
|