Criteria checker (1 Viewer)

mark curtis

Registered User.
Local time
Today, 00:26
Joined
Oct 9, 2000
Messages
457
Dear all,
I need to run a routine that checks two criteria based on a parameter value.

eg

I want a user to insert their social security number then I want to click a button that checks if the user has firstly used their limit(a field that stores a value) then secondly checks if they have a bad credit record(field that stores credit rating) then to finsh returns a message to say proceed or stop because they fail the above criteria.

Any examples would be great.

Thanks
Mark
 

doulostheou

Registered User.
Local time
Yesterday, 18:26
Joined
Feb 8, 2002
Messages
314
I might be making your question too simplistic. I am assuming the social security number is already tied to their limit and credit rating. Create a form based off of a query that linked the two tables together (joining the two by the social). You would have 4 fields on the form, one unbound (name it FindSocial), one for the social, one for the limit, one for the rating. You would type the social in the unbound field and then onclick of the button the code would run:

Social.setfocus
docmd.FindRecord FindSocial
If limit<(max amount) And rating>(good rating) Then
msgbox "Proceed"
Else
msgbox "Stop"
End if

If the max amount and good rating varies from person to person, you may have to incorporate another query that evaluates whether it is good or bad and returns a value accordingly.
 

Users who are viewing this thread

Top Bottom