to make it can not enter data

  • Thread starter Frank Situmorang
  • Start date
F

Frank Situmorang

Hello,

I have the text control for church ID ranging from 1 to 9999. For
consolidation purposes in the regional office, I will assingn the number 9991
for a Regional Office. What shall I say on the VBA. if chruch ID starts with
9..., can not enter the data in all forms in the database.

Thanks very much
 
T

Tom van Stiphout

On Mon, 2 Feb 2009 02:30:00 -0800, Frank Situmorang

In the form_current event:
if Me.ChurchID = 9991 then
Me.AllowEdits = False
else
Me.AllowEdits = True
end if

-Tom.
Microsoft Access MVP
 
F

Frank Situmorang

Hello,

Thanks Tom for your quick answer. The cosolidation unit will be many
officess so it is better if we say when church ID statrs with 9....

We appreciate your idea again.

Thanks in advance.
 
L

Linq Adams via AccessMonster.com

As Tom's answer shows, Frank, your needs still aren't clear. You say

"it is better if we say when church ID starts with 9"

and since your numbers run from 1 to 9999, if you disallow editing when the
church ID starts with 9, this will include ChurchID numbers

9
91-99
900-999
9000-9999

and I don't really think this is what you had in mind. We really need to know
the range of numbers to include in disallowing editing.
 
F

Frank Situmorang

Ok Ling...the range I want is 9000 to 9999

Could you make it?

Thanks very much
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top