Results 1 to 7 of 7
  1. #1
    beaverx37 is offline Novice
    Windows 8 Access 2007
    Join Date
    Nov 2014
    Posts
    16

    VBA Me. Code Problems

    Click image for larger version. 
<br /><script async src=
    Name: VBA Code 1.png  Views: 12  Size: 121.0 KB  ID: 19655" class="thumbnail" style="float:CONFIG" />
    I have two problems, my first one is I am trying get Me.CamperIdNum It was originally named CamperID# but I was having problems getting it to work so I changed it and it changed everywhere else in my database except here. Is there a way to fix that?

    Second is I am trying to get Me.GoToBox.Value = Me.CamperIdNum.Value
    GoToBox is my combo box that allows you to select a specific record and CamperIdNum is my primary key.

    The goal is if I select a record by using the previous and next record buttons, I want the combo box to respond and change to the record that is displaying. I keep getting this error though Click image for larger version. 

Name:	VBA Code 2.png 
Views:	12 
Size:	126.8 KB 
ID:	19656

    I don't know very much about code so you're explaining to a beginner

    Thanks!!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,642
    Something somewhere still has the old name. Verify names of controls on form, start with whatever CamperIDNum is supposed to be referencing.

    I use Rick Fisher's Find & Replace for Access to track down this sort of issue. Saved my sanity more than once. Cost about $50. A freebie called V-Tools has good reviews.
    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
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    India
    Posts
    616
    While in VBA window press Ctrl + F to bring up the standard Find & replace window and use it to replace the code. You can selectively find/ replace in a procedure/module or entire project.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,642
    That will not search in properties of objects and controls. Require 3rd party app.
    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
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    India
    Posts
    616
    I have two problems, my first one is I am trying get Me.CamperIdNum It was originally named CamperID# but I was having problems getting it to work so I changed it and it changed everywhere else in my database except here. Is there a way to fix that?
    I was trying to help OP to resolve the above issue.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,642
    I think they did the search/replace in VBA code and the remaining issues are due to something (textbox, combobox, fieldname) still has the old name. The 'not found' error tells me the control still has the old name. Access does not have any tool for search/replace in properties.
    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
    beaverx37 is offline Novice
    Windows 8 Access 2007
    Join Date
    Nov 2014
    Posts
    16
    It finally updated on its on, thank you! And the code worked just fine this time

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

Similar Threads

  1. SendEmail Code having problems...
    By wnicole in forum Access
    Replies: 59
    Last Post: 10-14-2013, 08:01 PM
  2. Code Problems With Variables
    By bidbud68 in forum Programming
    Replies: 6
    Last Post: 01-30-2013, 01:37 PM
  3. Problems Executing SavedQuery in Code
    By RMittelman in forum Programming
    Replies: 4
    Last Post: 06-18-2011, 02:49 PM
  4. Replies: 4
    Last Post: 01-11-2010, 11:41 PM
  5. Merge Code problems
    By kfergus in forum Access
    Replies: 1
    Last Post: 06-01-2006, 03:36 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