User Profile

Collapse

Profile Sidebar

Collapse
DPRapson
DPRapson
Last Activity: Jan 7 '14, 07:44 PM
Joined: Dec 15 '13
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Schrodinger's cat is out of the box!

    Having thought about the responses from NeoPa and zmdb, I went and rehashed my code based on on and example that looked for a record and then showed the record. And to my surprise it works.

    I have listed the code below for those who are interested.

    Thank you to all who helped.

    Dave

    Code:
    Private Sub Form_BeforeUpdate(Cancel As Integer)
    
    Dim
    ...
    See more | Go to post

    Leave a comment:


  • Thank you for explaining why, but I an asking for help on how to fix this.
    See more | Go to post

    Leave a comment:


  • Check for Existing Records - Code Returns "No Current Record" message

    Hi All,

    The code listed below does what it should. It checks for existing records in 2 fields an then allows for 3 options:

    1. Yes - Existing found, add duplicate (2 John Smiths)
    2. No - Open existing record
    3. Cancel - Cancel and Undo

    However after the code runs I get a message "no current record" message.

    debugging shows that the problem happens after the me.u...
    See more | Go to post

  • DPRapson
    replied to Find Existing Records, Error: 2115
    zmbd and Neopa,

    With help, I have managed to solve the problem. Thank you for your assistance.

    Regards,

    Dave
    See more | Go to post

    Leave a comment:


  • DPRapson
    replied to Find Existing Records, Error: 2115
    zmbd,

    Sorry I miss read! The line of code is exactly as per Neopa's post:

    Cancel = True =/= Call {Control or form}.Undo()

    I have tried "Googling" but cannot find anything remotely similar.

    Dave

    P.S. This is what the code looks like at the moment:

    Code:
    Private Sub Form_BeforeUpdate(Cancel As Integer)
      'Check that no user exists with the same name
    ...
    See more | Go to post

    Leave a comment:


  • DPRapson
    replied to Find Existing Records, Error: 2115
    ZMDB,

    Please can you clarify your last post. Where is the typo? What must I Cut and Paste?

    Thank you,

    Dave
    See more | Go to post

    Leave a comment:


  • DPRapson
    replied to Find Existing Records, Error: 2115
    Hi Neopa,

    Thank you for replying. I changed line 25 of the code I posted like you suggested, but text is high-lighted in red and when I compile I get a Compile Error: Syntax error window.

    Regards,

    Dave
    See more | Go to post

    Leave a comment:


  • DPRapson
    replied to Find Existing Records, Error: 2115
    Hi ZMBD,

    Thank you for your response and suggestions. In reply I am using MS Access Professional Plus 2013 on Windows 8 Professional.

    The exact error message is as follows:

    Run-time error '2115': The Macro or function set in the BeforeUpdate or Validation Rule property for this field is preventing Trading Places Database from saving the data in the field.

    "Trading Places Database" is the...
    See more | Go to post

    Leave a comment:


  • DPRapson
    started a topic Find Existing Records, Error: 2115

    Find Existing Records, Error: 2115

    Hi,

    I am New to Access and have very little coding experience.

    I am trying to modify the code (see below) posted by TheSmileyCoder on this site.

    Basically, the code checks for existing records. 3 options are given:

    1. Save new record
    2. Duplicate found go to that the record
    3. Cancel and Undo

    Option 2. returns a runtime error:2115 and the debugger highlights...
    See more | Go to post
No activity results to display
Show More
Working...