Results 1 to 6 of 6
  1. #1
    data808 is offline Noob
    Windows XP Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    727

    Report Find Record Button

    I have created a Find Record button in one of my forms. I used the control wizard to make the find record button. The next thing I did was copied and pasted this same button from the form to my report and it works pretty nicely. So I did again into another report and then it didn't work. It has this error window that pops up. I can't remember exactly what the error message says because the file is at work but it had some kind of check box saying they can try fixing or debugging the database and at the bottom it had the options to send or don't send the error report to microsoft.

    Does anyone know what may be causing this? It does work in the first report that I pasted the find record button in but not the second. I checked the macro conditions, actions, and arguments and they look the same.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    The error you are receiving is your DB crashing. I would have expected an exception (error) if your macro did not work. The macro probably started and never stopped, causing Access to take over after a certain amount of time.

    I try not to make two or more forms that are alike so copying code and or macros from one form to another won't work unless I adjust the code/macro to suit the new form. Perhaps you could just create a new control and macro.

  3. #3
    data808 is offline Noob
    Windows XP Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    727
    Ok. Thats actually what I wanted to do but found out that the button control wizard, for some reason does not pop up when creating a new button in a report. It pops up in my forms. Just not the reports. I messed with the control wizard button but still nothing. I don't really know how to make a find record button the way that I want without the wizard. I like it exactly the way the wizard creates the button for me where I can type a value for what it is I am looking for. And I can select parameters like whole field or any part of the field kind of settings. Do you know how to do this without the wizard? Or if you could tell me how to get the wizard working in reports that would be great. Thanks.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I don't use reports like forms so I am not sure what all of their capabilities are. Here is an example of using the value of a combobox to take the user to a relative record within a form's recordset.

    https://www.accessforums.net/forms/e...tml#post208679

    Let us know if that helps....

  5. #5
    data808 is offline Noob
    Windows XP Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    727
    Well in forms I haven't had a problem setting up a find record button because the control wizard actually pops up to help me set up the button. Not sure why it doesn't work in reports. Anyway I looked at the combo box link and I'm not sure if that would work with my database as I have thousands of records. Does the combo box search by me typing something in the box itself? Or is a drop down list of all the records and I have to click on the record I want to view in the form. If its that then I don't want to go through thousands of records to find the one I need to view.

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    You do not have to use a combobox to get user input. You could use a textbox, for example.

    So if it is not a combobox or listbox you would not need to tell access what column to retrieve the value from.

    rs.FindFirst "[cust_name] = '" & Me.ComboboxName.Column(0) & "'"

    would be

    rs.FindFirst "[cust_name] = '" & Me.TextboxName.Value & "'"

    This assumes you are searching for a value in a field of text data type. You can also use wildcards to search the beginning of a field or end of field, etc.

    rs.FindFirst "[cust_name] = '" & Me.TextboxName.Value & "*'"

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Find Record Button
    By data808 in forum Forms
    Replies: 3
    Last Post: 01-12-2014, 01:05 PM
  2. Replies: 7
    Last Post: 06-12-2012, 08:56 AM
  3. Combo to find record on report
    By djclntn in forum Reports
    Replies: 2
    Last Post: 04-03-2012, 02:54 PM
  4. Replies: 3
    Last Post: 02-23-2010, 06:32 PM
  5. Find Record button error
    By Zedlexx in forum Forms
    Replies: 0
    Last Post: 03-11-2009, 09:26 AM

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