[AccessD] Re: Compare first letter of String

Darren DICK d.dick at uws.edu.au
Mon Mar 21 23:33:54 CST 2005


Hi Connie
Try something like

	If left(YourString,1) = "A" then
 		'Do the stuff that only A's can do
	ElseIf left(YourString,1) = "L" then
 		'Do the stuff that only L's can do
	ElseIf left(YourString,1) = "P" then
 		'Do the stuff that only P's can do
	Else
		Msgbox "Unknown Auth. Number"
	end if
HTH

Darren


-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
connie.kamrowski at agric.nsw.gov.au
Sent: Tuesday, 22 March 2005 4:19 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] Re: Compare first letter of String 


I have three sets of Strings to represent Authority Number they begin with one of three letters A, L or P.

I need to limit access to the reports to the corresponding letter. ie For the Approval Certificate I only want the Authorities with
A at the start to be able to open this form.

I will put the limitation on the button to open the Certificate but I am not sure how to do this, do I use the LEFT$


Connie Kamrowski

Analyst/Programmer
Information Technology
NSW Department of Primary Industries
Orange


This message is intended for the addressee named and may contain confidential information. If you are not the intended recipient or
received it in error, please delete the message and notify sender. Views expressed are those of the individual sender and are not
necessarily the views of their organisation.


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list