Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245

    search Report, Text

    Hey, In my Database i have a list of returns. it gives a repeat of the name for each row. Depending on the number of Returns, depends on the number of names repeated. I have the list generated giving me a table. Now I also have a Graph in this report. I want to specifically search the report through a Form. Now I have been able to search other reports based on the Specific Id while only showing the Name, is there away to Search soly on the Name its self. I know its not as unique as an id etc. Thanks

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    Yes, you could search on any field that is included in the RecordSource. I just don't know enough about your structure to give specifics.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245
    I have a report query which links 5 tables into one report, I need to filter through a combo box the name on a form, each table has every name in the same inputted order etc.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    That doesn't really tell me what your issue is. Why can't you do the search? What do you want to happen when the name is selected in combobox? What have you tried? Do you get error message, wrong results, nothing? Show code or provide the project for analysis - follow instructions at bottom of my post.

    Why is the name in all tables? This sounds like duplication of data.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245
    This is what i have been doing. In the criteria section of the report query i have been putting this: Like [Forms]![ReportCenter].[Form]![MyFundName] & "*"
    I have it set up that the report opens in a Report center form, ie a navigation form. Because of this it is a subform essentially. so that is why i have .[Form] after report center. I have named the combo box MyFundName.
    It is not duplicate data because each table contains a unique fields. I have a table for managers, Strategy, Decision, Performance, Risk. The Name in each table helps keep data together. I thought about if ithere is a better way andwith my brief experiance i couldnt think of one. If there is a better way please let me know. Now each ID is the same for each fund. The ID is the primary key in the tables. When the name is selected i have it set to requary after update. I want the name to be selected and filter through the report and bring only that names information, I have it group by the Name. I have each Name starting on a new page (Group and sort was handy for this). Now the way im trying to filter worked for me within forms etc through navigation forms. the error is that it doesnt recognize it. I have had it work for forms, and my research online says it will work with reports as well. Also I have made sure spelling and everything is correct.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    I have never used a report on a form. So did quick test of this. An unbound combobox provides criteria. Code in AfterUpdate event of combobox filters the report. Works great! I can actually use this. Example:
    Me.Child0.Report.Filter = "UmpID='" & Me.Combo2 & "'"
    Me.Child0.Report.FilterOn = True

    What is your code? I did not use query input parameter (don't like them). Your code probably should be a Requery of the report.

    Using names as unique identifiers has risk. What if you have two John Smith? Might be better to save an ID instead of name into each table. What are these names for - the managers?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245
    Attachment 8342The name is for the comapny. the reason i want to use the company name as a filter is because i have a table on the form and the company would be selected multiple times :S ive been struggling with this for a while now, keep moving on to something else and hopin i eventually figure it out. Thanks for the help, ill give ait a shot through code instead of query paraameters. Attached is the jist of what im doing, i apologizze for not being able to disclose anymroe information

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    Since you did not provide data, can't test.

    You do have a macro for the Requery but don't specify the subreport container control as the target of the requery.

    I don't use macros, only VBA.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245
    I appreciate the help, the reason it doesnt specify the report, is I believe that once the report comes up in the form, It is based on an empty combo box because it has already been told, so when I requery it will automatically tell the report this is the contents i want you to search on.
    Thanks,

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    So is that working?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245
    Ive been away, back at it tmw. once i figure it out i will mark this thread solved!

  12. #12
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245
    I cant even get it to recognize it. the path is not recognizable:S yet all names are correct... Like Forms!ReportCenter.Form!SearchFund & "*"
    Ive been working just in the query to get it to work. so im very confused on what is wrong. all my combo box filters are based with parameters and all work. except for the one going into the report.

  13. #13
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245
    Here is a copy. I want to be able to search aaa in a combo box or bbb for example. I have a id. but it still isnt working. i removed my Parameters and here is an example of the database attached.Attachment 8384

  14. #14
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    The filter doesn't work because the report RecordSource does not have filter parameter and the Requery macro does not specify what is to be requeried. When I converted the macro to VBA, the result was:
    Private Sub SelectFund_AfterUpdate()
    DoCmd.Requery ""
    End Sub

    I never used navigation form and I find it confusing. When I tried to modify the report RecordSource with a WHERE clause that references the combobox as input parameter, all the controls show invalid ControlSource error. Weird.

    So gave up and went with code to set Filter property. It works.

    Private Sub SelectFund_AfterUpdate()
    Me.NavigationSubform.Report.FilterOn = False
    Me.NavigationSubform.Report.Filter = "ID=" & Me.SelectFund
    Me.NavigationSubform.Report.FilterOn = True
    End Sub

    There might be macro equivalent to the VBA procedure but I don't use macros.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  15. #15
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245
    Hey THanks so much for taking a look for me, now im new to code and all. Im more familiar with macros, but that hasnt worked for me yet so im going to give code a shot! Works Like a charm! thanks so much! With regards to having charts in a report does the code change at all? i have two charts in another report. and they are the only part of the report that doesnt filter. They just go blank once load is fully complete
    thanks Again!

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Search List Box with Text Box
    By dalton in forum Access
    Replies: 6
    Last Post: 01-30-2013, 09:58 AM
  2. Replies: 1
    Last Post: 04-20-2012, 03:16 AM
  3. Replies: 0
    Last Post: 05-07-2010, 04:53 AM
  4. search in text
    By miziri in forum Forms
    Replies: 6
    Last Post: 03-28-2010, 10:48 PM
  5. Refresh form search text box
    By oxicottin in forum Forms
    Replies: 2
    Last Post: 11-19-2007, 02:28 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