RE: Report from form input

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Sure, but just start a new 'thread' because chances are that more people are
reading it again with a better chance of solving your question... ;-)
--
Maurice Ausum


"Mabeline" wrote:

Hi Maurice,

This worked a treat. Thanks very much.

I have another challenge that I am working on at the moment with another
report retrieving data from 2 tables where the search criteria will come from
a field on a form that the user enters. I want to have the report display all
the fields from both tables. Only 1 field is the same in both tables. The
first part of the report will be from the first table and the bottom section
of the report will be from the second table. The relationship is one (table
1) to many (table 2). Would it be ok if I was to respond through this link if
I can't get the report working to see if you could help me out again?

Thanks in advance.


Mabeline.

"Maurice" wrote:

Try this:

strCriteria = "[Description] Like '" & "*" & FindRecords & "*" & "'"

That should do the trick...

hth


--
Maurice Ausum


"Mabeline" wrote:

I am trying to build a report based on the input from a form (1 input field
only) where the users input could be say Rolling Stones or The Rolling Stones
or Stones. The report needs to be able to display all records with all or any
of these words.

I have the following code that I have used to generate other reports with
exact record matches but am unable to understand visual basic enough to be
able to alter it to ensure I get all the records as suggested above. The code
is:

Private Sub FindRecords_AfterUpdate()
Dim strCriteria As String
Dim stDocName As String


stDocName = "Report Table"
strCriteria = "[Description] Like '" & FindRecords & "'"
DoCmd.OpenReport stDocName, acPreview, , strCriteria
DoCmd.Maximize
End Sub

What changes do I need to make to get all the records?

Thanks in advance.


Mabeline.
.



Relevant Pages

  • Re: Skipping lines in reports
    ... Maurice omitted the bit about resetting the counter in the Page Header. ... Allen Browne - Microsoft MVP. ... My report hiccups with an Overflow error. ... >> Private Sub Detail_Format ...
    (microsoft.public.access.forms)
  • Re: I need help! Please MVPs, help me out
    ... Works fine now, Thanks for everything maurice. ... can you let me know if the new report you've created is printing ... "RobUCSD" wrote: ...
    (microsoft.public.access.formscoding)
  • Re: I need help! Please MVPs, help me out
    ... Maurice, thanks so much for your outstanding effort. ... rebuild the report and see what happens. ... "RobUCSD" wrote: ... can specify a specific printer per report) Report in design view - File ...
    (microsoft.public.access.formscoding)
  • Re: I need help! Please MVPs, help me out
    ... Thanks for your help Maurice. ... If you want to find out which printer this specific report is designated to ... Thanks, Rob ... can specify a specific printer per report) Report in design view - File ...
    (microsoft.public.access.formscoding)
  • Re: Coding with varsortby and options
    ... DoCmd.OpenReport stDocName, acViewPreview ... MsgBox "No Report Selected." ... Dim varhowsort As Variant ...
    (microsoft.public.access.formscoding)