making an edit box and coding it

K

kulangotski

hello,

our instructor told us to create buttons that has button.. it was alright at
first but there is one thing i can't do.. i can't seem to make an edit button.
 
L

Linq Adams via AccessMonster.com

This being a school project, I'll leave it to you to find an "easier" way to
do this, but explain why your current method doesn't work. Since you want to
find out how to allow edits, you might enter the search phrase "allow edit"
in Access Help.

**fieldname.unlocked**

doesn't work because there is no "unlocked" property!

The proper syntax would be

fieldname.Locked = False

Assuming that Intellisense is turned on, which is the default setting, when
you enter an object name, such as a textbox name, and follow it with a
period, Access will popup a box with all the possible properties of that
object. The next letter you type will take you to that part of the list, and
so forth.

If, in the code module, you type in

TextboxName.u

Access will take you to the ***Undo*** Property. You will immediately see
that there is no ***unlocked*** property. You can then run thru the box until,
hopefully, you find the ***Locked*** property and figure out that you need
to set that property to False.
 
K

kulangotski via AccessMonster.com

ei mr. adams, tnx for the post. appreciate it..

i think it is not working because of the syntax, you see i have only used the
java programming langauage and really am not sure of what i was writing in
VBA..

hehe..the locked property it was a silly guess, i thought there was something
like that..

tnx for your suggestions appreicate it...
im going to to try to get this done
 
K

kulangotski via AccessMonster.com

hi

this is what i just wrote...


Private Sub Command32_Click()

FirstName.Locked = False
MiddleName.Locked = False
LastName.Locked = False
Studentnumber.Locked = False
Birthday.Locked = False
Age.Locked = False
Cellnumber.Locked = False
Guardian.Locked = False
Course_Section.Locked = False
Address.Locked = False
Schoolgraduated.Locked = False
Favoriteinstructor.Locked = False

End Sub


is the syntax of each correct or not? if it is, do ihave to do something else
like connecting these codes to the button?

any more hint?
 
Top