Question about check box, command button in forms

kekewong

Registered User.
Local time
Today, 07:30
Joined
Apr 9, 2008
Messages
24
HI , i am newbie here . Currently i am doing my assignment about microsoft acess using version 2007. The assignment is easy but i am trying to make it very special :rolleyes: . I dont have any Visual basic programming knowledge but i have in C and abit of java language. I am trying to do this kind of task but i try and do research for 2 days, hope my senior here can help me some.
P/s: I just starting to learn IT .. PLease forgive me for not knowing too much :p


I am trying to do this tasks.......
First. I have a Gender field in employees table .Then i create a form of the employees . But i am facing a problem that is : I want to create 2 checkbox for "female" and "male" , and i want the result to display female of male in Gender field, but the result is showing "1" and "2" only . After i do research about this, i found that checkbox is run by boolean value. So , i was thinking, how can i convert the value of 1 or 2 to became "female"or "male". Can i put a formulas in Gender field? Something like this, IF([Gender]=1,"F"."M"). OR got another solutions?

second question: I am trying to do 1 checkbox that got relationship with command button. Example, after employees key in their information through Forms , then the employees have to check a checkbox then only can press the "SAVE RECORD" button. Something like Greyed-out command button. How can i do that?
 
Last edited:
OK i solve some of my question , second question

Private Sub Check34_AfterUpdate()
If Me.Check34 = True Then
Me.Command37.Enabled = True
Else
Me.Command37.Enabled = False
End If
End Sub

that means i only can click the command if the check box is check , but , i proceed to the next form to key in another information, the checkbox is automatically check . why like that? do i miss something to add in?
 
Last edited:
Keke, why not just use a combo box instead...where the user could choose either male or female. Much easier. If you already have records, just do an update query.
 

Users who are viewing this thread

Back
Top Bottom