Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    TokenMachine is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    9

    Error 2950 with Find Box "Expected: Go"

    I have a combo box that is set up to change which record is shown on the form. I had it working perfectly without any problems, but after tinkering with it, it gives me an error. I was trying to code in a way for it to not appear when printing the form, but somehow I screwed it up completely and even remaking it doesn’t fix the error. When I use the control I get an “Expected: Go” error message. A Macro Single Step window comes up and gives me an error number 2950.

    What did I do wrong?

  2. #2
    jwhite is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Dec 2012
    Location
    North Carolina
    Posts
    349
    Printing something from a Form is not a good or valid option, as you are experiencing. Design a report with the layout you desire, and then open the report via a button on the form, passing any filtering applied to the current data being viewed - if you want the report filtered too.

  3. #3
    Micron is online now Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    OK, so printing a form is not the best idea, but it doesn't solve the fact that it worked before but doesn't now. You didn't move the db between the time it worked and now? The error number usually means the db is not in a trusted location. If that's not the case, "When I use the control..." sounds like there is a problem with its control source or row source.

    BTW, the only way I can think of not showing the control in a printed form is to hide it during that time and unhide it after. Sounds like a lot of work for not much value.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    BTW, the only way I can think of not showing the control in a printed form is to hide it during that time and unhide it after
    Doesn't the "Display When" property do this for you?

  5. #5
    Micron is online now Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    I checked for that property in my version. Doesn't seem to exist for a comb box which is what I should have written and not have just written "control".
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    TokenMachine is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    9
    I think you guys are missing the main reason for my question. I'm no longer looking to hide the control when printing.

    My Find Box gives me an Expected: Go error when I use it to select records. It no longer updates my form.

  7. #7
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Sorry - offline discussion going on here!

    I checked for that property in my version
    Does for me - 2010.

  8. #8
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    sounds like there is a problem with its control source or row source
    Did you do as Micron suggested and look into this?

  9. #9
    Micron is online now Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Quote Originally Posted by TokenMachine View Post
    I think you guys are missing the main reason for my question. I'm no longer looking to hide the control when printing.
    My Find Box gives me an Expected: Go error when I use it to select records. It no longer updates my form.
    I reviewed the posts again - still don't see where you told us that you were not trying to hide it anymore. Nor did you use the term Find Box before now, not that I know what that is. I suppose you could be referring to the Find dialog box in Access, or maybe a text box you're trying to use to filter a set of records. Or maybe a macro parameter. I don't use macros, so maybe I don't really have much to offer here beyond the two suggestions I made in post #3, which you haven't addressed.

    I stand corrected on the Display When property for combo boxes. I missed it in the list the first time.

  10. #10
    TokenMachine is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    9
    Find Box is in the subject line.

    Here is the Macro Single Step error that comes up.
    Click image for larger version. 

Name:	Macro Single Step.PNG 
Views:	12 
Size:	9.0 KB 
ID:	26769

    My control source is empty. The Row source looks like this:
    SELECT [Report Information].[ID] FROM [Report Information];
    Which is what is given to me when I do the third option "Find a record on my form based on the value I selected in my combo box" in the combo box wizard.

    The database file is on my desktop for now, and it always has been, so I don't know why it would suddenly become a non-trusted location.

  11. #11
    Micron is online now Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    The fact that is on your desktop does not make that a trusted location by default. In case you are unaware, that term has a very specific meaning and is not just a phrase I coined. My desktop is not a trusted location. The reason it could fail now could be that until now, you have never attempted to perform an operation where this would be a problem. see https://support.microsoft.com/en-ca/kb/931407
    Last edited by Micron; 12-19-2016 at 09:26 AM. Reason: spellin

  12. #12
    TokenMachine is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    9
    I followed the instructions and moved my database to the default folder, Documents. I made it a trusted folder, but this error still occurs for me.

  13. #13
    Micron is online now Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Then the most I could do for you is Google searches (like ms access SearchForRecord 2950) because I'm not a macro user. You might as well perform those searches yourself, unless someone steps in with the magic answer. My last search came up with this, which you can try from step 6. I presume you already know how to get into the macro design - if not, the full post is here: https://social.msdn.microsoft.com/Fo...orum=accessdev

    6- You will see a new tab. The first line is called ' SearchForRecord '. Click on it.

    7- You will see a row or a line called ' Record '. There is a text next to it: 'First'. And there is a down arrow on
    the far right of the textBox. Click the arrow and change 'First' to 'Next'.
    8- Save and close that tab. Go to the Form View and try clicking on the list again. There should be no error
    9- Do the same steps and go to change 'Next' back to 'First'. Save and close and go back to form view. It
    Good luck with your search if that doesn't solve it, and no one else jumps in.

  14. #14
    TokenMachine is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    9
    That seemed really promising, but sadly didn't work. I'm thinking it might just be a bad form object now. I'll try duplicating the table and form and seeing if that helps any.

  15. #15
    Micron is online now Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    I guess corruption is a possibility I should have raised before now but that one seems to be a cop out at times, especially when the error number dictates otherwise. Yet I should know that these are sometimes misleading. You could try a compact and repair before replacing the control.

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

Similar Threads

  1. A 2950 error on a "SetFocus"!!!!!
    By GraeagleBill in forum Programming
    Replies: 7
    Last Post: 12-07-2015, 03:34 PM
  2. Replies: 2
    Last Post: 08-28-2015, 01:45 AM
  3. Execute, "Too few parameters", "Expected 2"
    By jhrBanker in forum Forms
    Replies: 3
    Last Post: 10-30-2014, 02:18 PM
  4. Replies: 4
    Last Post: 11-05-2013, 03:46 PM
  5. Replies: 1
    Last Post: 05-23-2012, 10:05 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