PDA

View Full Version : Solved: Sheet Code is not working correctly



Hoopsah
05-13-2009, 03:15 AM
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

Bob Phillips
05-13-2009, 04:39 AM
Try this

Hoopsah
05-13-2009, 05:00 AM
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.

Bob Phillips
05-13-2009, 05:19 AM
This should do it

Hoopsah
05-13-2009, 05:49 AM
Fantastic

Once again works perfectly.

Thanks Bob

Gerry

Hoopsah
05-14-2009, 12:41 AM
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 :banghead:
</IMG>
I have attached the full workbook

GTO
05-14-2009, 01:00 AM
Greetings Gerry,

Hope you don't mind, I took a peek:reading:

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

Hoopsah
05-14-2009, 02:04 AM
:thumb

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

GTO
05-14-2009, 05:47 AM
...staring at it too long to see anything...

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


Very glad to help:)

Mark