My recovery database help please (1 Viewer)

Kieran233

New member
Local time
Today, 16:31
Joined
Aug 27, 2014
Messages
5
I'm currently building a database for claims handlers to input recovery and storage costs on claims.

Different handlers have different limits to which they can self authorise. If it goes over there limit they need to have an authority code.

I'm trying to get it so that the authority code field on the form is disabled unless the "recovery cost" field is higher than the "recovery limit" field I then need the "authority code" to be a required field. Anyone able to help apologies if this sort of thing has already been asked I did look but on a smart phone it's a pain and I often miss pages by accident due to my fat thumbs.

I must also add that I am really rusty on VB code
 

burrina

Registered User.
Local time
Today, 10:31
Joined
May 10, 2014
Messages
972
Something like the below should work.
If Me.RecoveryCost < Me.RecoveryLimit Then
Me.AuthorityCode.Enabled = False
Else
Me.AuthorityCode.Enabled = True
End If


HTH
 

Kieran233

New member
Local time
Today, 16:31
Joined
Aug 27, 2014
Messages
5
Am i adding this to afterupdate event?
just tried that code and it didn't work, am really stuck with this have tried playing around with it a bit but cant seem to find the light at the end of the tunnel
 

burrina

Registered User.
Local time
Today, 10:31
Joined
May 10, 2014
Messages
972
I used the above code on a test form and it worked for me. Of course it would need to be on the OnCurrentEvent and also the AfterUpdateEvent .
 

vbaInet

AWF VIP
Local time
Today, 16:31
Joined
Jan 22, 2010
Messages
26,374
I'm trying to get it so that the authority code field on the form is disabled unless the "recovery cost" field is higher than the "recovery limit" field I then need the "authority code" to be a required field.
Your question seems to be in two fold.

1. Disable the "authority code" textbox if it meets the conditions. burrina's code will work if your form's default view is Single Form, otherwise you need to use Conditional Formatting
2. "authority code" should be required. This seems to conflict with your first requirement. Perhaps you can expand on this?

I must also add that I am really rusty on VB code
Rusty on VB but how good is your VBA? ;)
 

Kieran233

New member
Local time
Today, 16:31
Joined
Aug 27, 2014
Messages
5
I know it seems odd.

Basically I only want the authority code to be enabled if its over a handlers recovery limit. Once it is enabled I want it so that a supervisor has to enter their authority pin. I will try playing with it again tomorrow at work. Thanks for your help guys
 

burrina

Registered User.
Local time
Today, 10:31
Joined
May 10, 2014
Messages
972
Here is a quick DEMO I put together. Without seeing what you have it may not work for you. Of course modify to suit your needs.

HTH
 
Last edited:

Kieran233

New member
Local time
Today, 16:31
Joined
Aug 27, 2014
Messages
5
I've got it to kind of work, I just have to play around to get it to refresh and update the whole form so that it enables/disables when the information is entered.

Thanks for all of your help :)
 

burrina

Registered User.
Local time
Today, 10:31
Joined
May 10, 2014
Messages
972
Glad you got it working. Good Luck With Your Project!
 

Users who are viewing this thread

Top Bottom