Consulting

Results 1 to 9 of 9

Thread: Solved: Sheet Code is not working correctly

  1. #1
    VBAX Mentor Hoopsah's Avatar
    Joined
    Nov 2007
    Posts
    303
    Location

    Solved: Sheet Code is not working correctly

    Hi

    I have created an input sheet that reads the reference number from a database.

    If the reference number exists it will populate the appropriate cells. If it doesn't exist it will pop an error message up.

    All Cool.

    However, I want to have the reference cell blank when entering this screen and after the submit button has been clicked, but whenever I blank the cell I get my error message saying record doesn't exist.

    Anyone know how I can fix this?

    Copy of workbook attached.

    P.S. Does anyone know how to make a cell always be in uppercase?

    Thanks for any help

    Hoopsah
    Last edited by Hoopsah; 05-13-2009 at 04:13 AM.
    I am playing all the right notes, but not necessarily in the right order.
    Eric Morecambe

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Try this
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Mentor Hoopsah's Avatar
    Joined
    Nov 2007
    Posts
    303
    Location
    Hi Bob,

    thanks for replying.

    The sheet now accepts a bland cell (And thanks for the uppercase too) however, the submit button macro isn't working now.

    When you call an existing record and amend some of the details, click submit and the error message "Not a valid reference" pops up, then the "Record amended" messagebox pops up and the screen is cleared - but when you view the database no changes have occurred.
    I am playing all the right notes, but not necessarily in the right order.
    Eric Morecambe

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    This should do it
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Mentor Hoopsah's Avatar
    Joined
    Nov 2007
    Posts
    303
    Location
    Fantastic

    Once again works perfectly.

    Thanks Bob

    Gerry
    I am playing all the right notes, but not necessarily in the right order.
    Eric Morecambe

  6. #6
    VBAX Mentor Hoopsah's Avatar
    Joined
    Nov 2007
    Posts
    303
    Location
    Hi Bob,

    wonder if you can help me again.

    I downloaded your attachment that works perfectly, but when I copied it into my workbook I keep getting an error message that 'Range of object'_Worksheet' failed.

    I can't see anything different from your original attachment
    </IMG>
    I have attached the full workbook
    Last edited by Hoopsah; 05-14-2009 at 02:05 AM.
    I am playing all the right notes, but not necessarily in the right order.
    Eric Morecambe

  7. #7
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Greetings Gerry,

    Hope you don't mind, I took a peek

    In the Amend Data worksheet I checked the insert names dialog. "RefNo" shows as "=#REF!$F$6" in the refers to box.

    Does that help?

    Mark

  8. #8
    VBAX Mentor Hoopsah's Avatar
    Joined
    Nov 2007
    Posts
    303
    Location


    Hi Mark

    thank you - that is exactly what was wrong. I think I had been staring at it too long to see anything. I have amended the reference and it now works perfectly.

    Thanks for your help

    Cheers

    Gerry
    I am playing all the right notes, but not necessarily in the right order.
    Eric Morecambe

  9. #9
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    ...staring at it too long to see anything...

    I've certainly been at that "location" way too many times!


    Very glad to help

    Mark

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •