Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 40
  1. #16
    blueraincoat is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Location
    Shanghai,CHN
    Posts
    99

    Quote Originally Posted by ahmad View Post
    is it possible that access report open directly from vb6 button click?
    That's out of my knowledge...I'm a rookie also

  2. #17
    blueraincoat is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Location
    Shanghai,CHN
    Posts
    99
    Quote Originally Posted by ahmad View Post
    i mean, enter text in textbox and click button to open particular report directly.
    I think you can add some code in the button_click event to open different report according to the text entered.
    Or you can add more different buttons to make it simple to open particular report.

  3. #18
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2007
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Do you mean VBA insted of vb6?

    Don't use textbox. Use combo or list box that specifies the choices to user. User selects one of the items and code opens the selected report. Can be in the AfterUpdate event of control: DoCmd.OpenReport Me.cbxReports

  4. #19
    ahmad is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    18
    hi, any1 tell me coding of date range that i entered in the textbox for open report.
    pllllzzzzz

  5. #20
    blueraincoat is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Location
    Shanghai,CHN
    Posts
    99
    For a date value, use # instead of the single quote:
    DoCmd.OpenForm "SecondFormName", , , "FieldName = #" & Me.ControlName & "#"

    This is a web supplied by a guy in this forum,it's very useful.
    http://www.baldyweb.com/wherecondition.htm

  6. #21
    ahmad is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    18
    hi,

    dear i m unable to do it. i wanna open report where i enter first date in textbox1 and second date in textbox2, and then click button then open all records of report from first date to second date( like 01-may-2011 to 15-may-2011).

    thanks

  7. #22
    blueraincoat is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Location
    Shanghai,CHN
    Posts
    99
    Sorry for my last reply, that's too assiduous
    Do you have a date field in the report? Try following code, I think it should work.

    DoCmd.OpenReport ReportName, acViewPreview, , "Date>" & Me.textbox1.value & "And" & "Date<" & Me.textbox2.value


  8. #23
    ahmad is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    18
    HI,
    Dear error is coming
    runtime error. '3075'
    syntax error
    '(dateofissue>25-apr-11anddateofissue<4may-11)'

    coding is

    DoCmd.OpenReport "statement", acPreview, , "Dateofissue>" & Me.Text106.Value & "And" & "Dateofissue<" & Me.Text108.Value

  9. #24
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You still need the date delimiter, plus you missed some spaces, so try:

    DoCmd.OpenReport "statement", acViewPreview, , "Dateofissue >=#" & Me.textbox1.value & "# And Dateofissue <= #" & Me.textbox2.value & "#"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #25
    blueraincoat is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Location
    Shanghai,CHN
    Posts
    99
    DoCmd.OpenReport "statement", acViewPreview, , "Dateofissue >=#" & Me.textbox1.value & "# And Dateofissue <= #" & Me.textbox2.value & "#"[/QUOTE]
    Thanks Paul.
    The code you wrote is very brief.

  11. #26
    ahmad is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    18
    thanks pbaldy.

    but now blank report is opening. no records are there.

  12. #27
    blueraincoat is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Location
    Shanghai,CHN
    Posts
    99
    Since the syntax works, the problem may be the date problem.
    Make sure your begin date and end date is correct or the records do exist.

  13. #28
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  14. #29
    ahmad is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    18
    thank you very much.

    dear, is it possible that i can add another textbox3 that has text in following coding
    DoCmd.OpenReport "statement", acViewPreview, , "Dateofissue >=#" & Me.textbox1.value & "# And Dateofissue <= #" & Me.textbox2.value & "#"

  15. #30
    blueraincoat is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Location
    Shanghai,CHN
    Posts
    99
    I'm sorry I do not understand what you mean.
    You want to add another textbox3 on your form and then?

Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Filling in blank textbox on a report.
    By cowboy in forum Reports
    Replies: 3
    Last Post: 04-16-2010, 02:50 PM
  2. Report TextBox printing ID Number, not text
    By ZipDoc in forum Reports
    Replies: 8
    Last Post: 02-01-2010, 12:30 PM
  3. Replies: 2
    Last Post: 09-26-2009, 07:19 AM
  4. Keeping text in a report textbox
    By Hawkx1 in forum Reports
    Replies: 2
    Last Post: 11-13-2008, 04:11 PM
  5. Report will not print a bound textbox
    By vvrt in forum Reports
    Replies: 0
    Last Post: 03-16-2006, 02:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums