Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2003
    Posts
    5

    Unanswered: problem in forum

    i just want to pass the parameters of a query to the receiving form in a text box...
    ="From: " & [Enter A Start Date] & " to " & [Enter An End Date]
    i wrote this to text box that i want to see the parameters but it didnt work...any suggestions?

  2. #2
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    Probe this:

    ="From: " & "#" & [Enter A Start Date] & "#" & " to " & "#" & [Enter An End Date] & "#"
    Saludos
    Norberto

  3. #3
    Join Date
    Dec 2003
    Posts
    5
    no, it didnt work..

  4. #4
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    Post the query.
    Saludos
    Norberto

  5. #5
    Join Date
    Nov 2003
    Posts
    1,487

    Re: problem in forum

    Originally posted by demolay
    i just want to pass the parameters of a query to the receiving form in a text box...
    ="From: " & [Enter A Start Date] & " to " & [Enter An End Date]
    i wrote this to text box that i want to see the parameters but it didnt work...any suggestions?
    I don't seem to understand exactly what it is you are trying to accomplish. Is it that you want to see the true query within a textbox that is contained on the form recieving the query?

    Or is it that you what to pass the query writen within your textbox??

  6. #6
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    If I understand correctly, you want to send a string to the text box that would read:

    From: 1/1/2003 to 1/1/2004 - assuming that 1/1/2003 and 1/1/2004 where values obtained from the user?


    to do this, you will need to use an input box, like so:

    txtYourTextBox.Value = "From :" & InputBox("Enter Start Date", "start date") & " to " & InputBox("Enter End Date", "end date")

    If you need to use the parameters in a query later, you could also store them as string vars first. So it would be:

    Dim sdate AS string
    Dim edate AS string

    sdate = InputBox("Enter Start Date", "start date")
    edate = InputBox("Enter End Date", "end date")

    txtYourTextBox.Value = "From : " & sdate & " to " & edate

    'if you need, you can set a query source here

    MyReport.RecordSource = "SELECT SOMESTUFF WHERE param = " & sdate 'etc
    Last edited by Teddy; 12-15-03 at 12:36.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •