How Do I Set RecordSource in VBA to a Predefined Query?

How Do I Set RecordSource in VBA to a Predefined Query?
For example...
Me.RecordSource = qryAllUsers
Does not work.
Thanks,
Dave

Is qryAllUsers a String containing the SQL select query text, or is it a QueryDef object?
RecordSource expects to be passed a String, not a QueryDef.  If you're trying to pass the latter, it ought to be snagged as a compile-time error.  Can you give any more information about how it "doesn't work"?

Similar Messages

  • How do I set form automatically in query mode

    Hi !
    I have to pass value of one field as parameter from one form to
    another form and then execute the query on the next form based
    on the passed value of the parameter. (all this should happen as
    soon as I press one button on the first form).
    My problem is that unless I put the second form in the enter
    query mode before accepting the value of the field, whatever
    value I pass on from the first form will not be of any use.
    How do I set the mode of the form to query mode. Since
    system.mode is the read only variable and no value can be
    assigned to it, so how can I handle this situation ?
    Thanks in advance,
    Shobhit
    null

    Hi Shobhit,
    Try ENTER_QUERY command in the PRE-FORM trigger of second form.
    EXECUTE_QUERY in WHEN-NEW-FORM-INSTANCE and set the parameter
    values to the respective fields in PRE-QUERY trigger.
    Lalit
    Shobhit Kumar (guest) wrote:
    : Hi Steve !
    : Thanks for the answer. but I want a bit different
    functionality.
    : I have already tried using execute-query (built in) in the when-
    : new-form-instance and passed the value of the parameter in the
    : field. But all that is happening is that the value is just
    : sitting in the field and query is not getting executed
    : automatically. I am using forms 5.0 and to enter a query we
    need
    : to change the mode of the form in the query mode (by clicking
    : the enter->query button) and then enter the values in the
    fields
    : that would be used to build the query and the as soon as I say
    : execute query it executes the query and displays the results.
    : What I want is that as soon as I press a button in a form,
    value
    : of one field should go to another field in a second form and
    : then the query should get executed automatically in the second
    : form and the results should be displayed in that form.
    : Any suggestions ?
    : Regards,
    : Shobhit
    : Steve (guest) wrote:
    : : You might want to try placing the builtin EXECUTE_QUERY
    : : in the WHEN-NEW-FORM-INSTANCE trigger to auto query the form.
    : You
    : : may also want to use the SET_BLOCK_PROPERTY(DEFAULT_WHERE,
    : : '.......'); to restrict queried records or set :block.item
    : values
    : : in a PRE-QUERY Trigger.
    : : Shobhit Kumar (guest) wrote:
    : : : Hi !
    : : : I have to pass value of one field as parameter from one
    form
    : to
    : : : another form and then execute the query on the next form
    : based
    : : : on the passed value of the parameter. (all this should
    : happen
    : : as
    : : : soon as I press one button on the first form).
    : : : My problem is that unless I put the second form in the
    enter
    : : : query mode before accepting the value of the field,
    whatever
    : : : value I pass on from the first form will not be of any use.
    : : : How do I set the mode of the form to query mode. Since
    : : : system.mode is the read only variable and no value can be
    : : : assigned to it, so how can I handle this situation ?
    : : : Thanks in advance,
    : : : Shobhit
    null

  • How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    unless i'm missing something, i think you got mixed up, this is easy google for walk throughs
    i'm assuming this is the new 3tb tc AC or 'tower' shape, if so, its wifi will run circles around your at&t device
    unplug the at&t box for a minute and plug it back in
    factory reset your tc - unplug it, hold down reset and keep holding while you plug it back in - only release reset when amber light flashes in 10-20s
    connect the tc to your at&t box via eth in the wan port, wait 1 minute, open airport utility look in 'other wifi devices' to setup the tc
    create a new wifi network (give it a different name than your at&t one) and put the tc in bridge mode (it may do this automatically for you, but you should double check) under the 'network' tab
    login to your at&t router and disable wifi on it
    add new clients to the new wifi network, and point your Macs to the time machine for backups

  • How do I set up family sharing if all my family members emails are already associated with my iTunes account?

    I want to set up family sharing but it won't let me because all the emails are already associated with the one iTunes account we have.  I am afraid to delete because my children use that email address for text messaging.  How do I set up family sharing if all my family members emails are already associated with my iTunes account?

    Hey Wendaroski,
    I am not quite sure what you mean by "my family members emails are already associated with my iTunes account" but what you need for each family member is an Apple ID. Yours would be the one for your iTunes account.
    If the other members of the family already have an Apple ID you can invite them to join the family group. If not they will need to create one, using their email address. This article shows how -
    Set up an Apple ID in iTunes - Apple Support
    Thanks for using Apple Support Communities.
    Be well,
    Brett L 

  • How do I set up IPad 2 and 2-4s IPhones with Apple?

    I have a 32 GB IPad 2 and ITunes on my Windows computer and just ordered 2-16 GB 4s IPhones for my wife and myself  I have 18.5 GB of data on my IPad, but only want to selectively include some of the applications and music on my IPhones.  I have IOS5.  Both IPhones will be loaded with appx 10 GB of data, but each will have different applications and music - all which is loaded on my IPad 2 and ITunes on my computer.  How do I do this most efficiently?
    1.  Do I use the same Apple ID# I use now on all devices, or set up a separate one on each device?
    2.  If I use the same Applie ID# on all devices, should I set up a different ICloud account on each device to keep the backups separate?
    3.  If I download an album on my IPhone, will either (or both) 1 and 2 allow that album to be downloaded on all of my devices through ICloud?
    I was advised that if I have a large music library to make sure the phones aren't set to autosync.  Does this sound correct?
    I'm trying to get answers to my questions lined up before they I receive them so I know how to best set them up.
    Thanks everyone.

    1)  You can use one id.  My wife and I do.
    2) Not sure.  Sorry.  We share one.
    3)  Yes.
    We sync via the cable.  We simply select what we want to sync on each device and sync.

  • How do I set up multiple iMessage emails with one Apple ID?

    We have one Apple ID and many family members with iPads, iPhones etc... As it stands we all receive all incoming imessages and this is impracticle moving forward.
    Other than setting up multiple Apple ID's how do we set up each user with an individual iMessage address?
    I understand how to do this using a phone numbers but cannot stop all users getting imessages sent to the Apple ID email address. I have tried inputting secondary email addresses but get error messages advising "account already in use".
    Long story short.....Can I set up all family devices on the one apple ID but designate each member with an individual email address that precludes them from receiving iMessages sent to the "master" Apple ID address?
    Phew
    Thanks

    To my knowledge, yes, this is impossible.  Your primary iMessage account is your AppleID account, so as long as you all share the one AppleID, then all messages will appear on all iOS 5 devices using that AppleID for their iMessage account.
    The only thing to do is have people set up their own iMessage ID.  They can stil then set up unique "receive at" addresses, but these are really additional addresses for messages to go to, and do not get around the fact that the account itself is defined by the AppleID.
    P.S. there is nothing stopping you from using the one, common AppleID for the iTunes and app store, then setting up a new one and just using that for iMessage.

  • How do I set upmy Imac to allow using both my computer speakers and a Bose SoundLink system as outputs at the same time.  I can use one or the other, but not both.

    how do I set up my Imac to allow using both my computer speakers and a Bose SoundLink system as outputs at the same time.  I can use one or the other, but not both.  From systems Preferences I must select one or the other.  I want both to work all the time.

    Hi,
    I would recommend you to use 0FI_AP_4 rather using both, particularly for many reasons -
    1. DS: 0FI_AP_4  replaces DataSource 0FI_AP_3 and still uses the same extraction structure. For more details refer to the OSS note 410797.
    2. You can run the 0FI_AP_4 independent of any other FI datasources like 0FI_AR_4 and 0FI_GL_4 or even 0FI_GL_14. For more details refer to the OSS note: 551044.
    3. Map the 0FI_AP_4 to DSO: 0FIAP_O03 (or create a Z one as per your requirement).
    4. Load the same to a InfoCube (0FIAP_C03).
    Hope this helps.
    Thanks.
    Nazeer

  • Have four family members with iOS devices on same account. How do I set up separate FaceTime for each?

    Four members of my family have iOS devices. We are all on same account. How can I set up FaceTime so that we can contact each other. Right now it is confusing to use.

    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
     Cheers, Tom

  • How do I set up multiple Ipods on same ITunes account?

    Adding more and more tunes into my ITunes on PC; I filled up my 160 GB Ipod. How can I set it that the next batch of songs goes onto another Ipod?

    Click here for options.
    (67350)

  • How can I set up an email user as "send-only" (no mailbox for receiving)?

    Can anyone tell me how I can set up an email account that can send emails but not receive emails.
    Our Web application has been using a generic email address "[email protected]" in all of our PHP Web applications as the sending email account. I have this user set up in WORKGROUP ADMIN as a proper account. However the account gets tons of SPAM emails and is constantly filling up.
    Also, all of the email accounts require SMTP authentication to send emails.
    Is there any way to identify an account as a send only account so we can generate emails from our Web applications that cannot be replied to?
    Thanks for the help
    -- Jon

    Doing so will cause issues. If you send out mail which to an outside server appears to be non existent, mail may be rejected and you may even be blacklisted.
    You can remove the account from WGM and add a role account as an alias send to /dev/null. This will look to the outside world like an existing address, but simply be discarded on your system. You should however include a working address in your mailings for people to be able to respond.
    Assuming you use local domains, edit /etc/postfix/aliases and add:
    noreply: /dev/null
    (you can change noreply with the sender used in your PHP apps, but I'd probably change the PHP apps to use noreply as this signals to people receiving your mails that this address is unattended).
    When done, issue:
    sudo postalias /etc/postfix/aliases
    sudo newaliases
    sudo postfix reload
    HTH,
    Alex

  • I forgot the administrator password for my mac and cant set a new one without it how can i set a new one

    i forgot the administrator password for my mac and cant set a new one without it how can i set a new one

    Reset Password 10.7, 10.8...
    http://reviews.cnet.com/8301-13727_7-20087723-263/how-to-run-the-password-reset- utility-in-os-x-10.7-lion/

  • In iCal how do i set an event every 3 months

    In iCal how do i set an event every 3 months.

    Sk8trdad,
    I presume that your question relates to the Calendar App on the iPad.
    You have to use the "repeat>Custom" setting on the Desktop version of iCal.

  • How can I set an event to repeat on a week day rather than a numerical day of each month?

    How can I set an event to repeat on a week day rather than a numerical day of each month? I see an option at the bottom of the repeat window .... but I cannot use it. Actually, when I try it freezes up my Calendar.
    Lorrene Baum Davis

    These scrrenshots are from Snow Leopard - I would think that Lion wouldn't be too much different.

  • How do i set up my e print to print in color

    How do I set up my printer to print in color   ?

    Hi,
    On my printer, I set it to print in color then it will print in color. You can do the same for your printer. Millions of them are out there, what is yours anyway ? To help us answer question quicker, please read this:
       http://h30434.www3.hp.com/t5/First-Time-Here-Learn-How-to/Welcome-Get-started-here/td-p/699035
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How do I set up my printer to only print in black?

    how do I set up my printer to only print in black?

    Please read this post then provide some details.  What printer model? What operating system?   Depending on your printer model you might remove the color cartridge, forcing black only printing, or select "Print in Grayscale" and "Black ink only" in the driver. 
    Some printer models (whether from HP or other manufacturers) may not allow printing in black if the color inks are empty.  There are also some other constraints, black only printing is generally not available when printing on photo papers and may not be available when printing with an automatic two-sided duplexer.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

Maybe you are looking for

  • Syncing photos on ipad

    why does itunes ask if I want to delete all my apps when I try to copy photos from my PC?

  • How to add a button in a list uibb

    Hello Volks, I need help. I have to add a Button ( or just events to a button ) to a list uibb dynamically at runtime, which means I can't use the ~get-definition method. This means I have to do it in ~get-data. I can define my actions there and add

  • Function Module to read Info cube data

    Hi Guys,           Is there any function module which is used to read the data in the info cube and collect the data to an internal table? Thanks Kumar

  • BLOB Destination

    Hello there, I have a problem with saving a report, generated by oracle report at the run time, in table BLOB column. I'm using Oracle 10g forms/reports and BLOBDestination.jar as a plugin. I followed all necessary steps to setup my development machi

  • Slidehow feature in Finder, missing images

    Hello, very recent "switcher" here. I can't seem to get the Finder slideshow feature to work properly. I select column view in Finder, then all the images in the folder and select the sideshow action, but the slideshow only ever picks up a portion of