I have a doc that I want to pass input to using a form.
I have designed the form
there is a frame with two option buttons in
8 txt boxes, a combo box, another frame with 5 check boxes in and then three cmd buttons OK, Clear & cancel
The idea is that if new is chosen from the 1 st option then you see so many of the txt boxes and if Modify you see a different selection
What I have so far is
BUT ..... when I click new or mod nothing changes on the txt box side
Also the clear button, fill the option and check boxes and then greys them, rather than clearing them.
Any help will be greatly appreciated
MTIA
<Do I need A Signature or will an X do?>
I have designed the form
there is a frame with two option buttons in
8 txt boxes, a combo box, another frame with 5 check boxes in and then three cmd buttons OK, Clear & cancel
The idea is that if new is chosen from the 1 st option then you see so many of the txt boxes and if Modify you see a different selection
What I have so far is
Code:
Private Sub UserForm_Initialize()
With cboAccess
.AddItem "Input"
.AddItem "Enquirer"
.AddItem "Authoriser A"
.AddItem "Authoriser B"
.AddItem "Remove"
End With
End Sub
Private Sub optNew_onclick()
txtFirstName.Visible = True
txtSurname.Visible = True
txtComitID.Visible = False
txtXXID.Visible = False
txtBuilding.Visible = True
txtTelephone.Visible = True
txtDepartment.Visible = True
txtEMail.Visible = True
End Sub
Private Sub optModify_onclick()
txtFirstName.Visible = True
txtSurname.Visible = True
txtComitID.Visible = True
txtXXID.Visible = True
txtBuilding.Visible = False
txtTelephone.Visible = False
txtDepartment.Visible = False
txtEMail.Visible = False
End Sub
Private Sub cmdClear_click()
optNew.Value = Null
optModify.Value = Null
txtFirstName.Value = Null
txtSurname.Value = Null
txtComitID.Value = Null
txtXXID.Value = Null
txtBuilding.Value = Null
txtTelephone.Value = Null
txtDepartment.Value = Null
txtEMail.Value = Null
cboAccess.Value = Null
chkMGI.Value = Null
chkMGIOLD.Value = Null
chkSLI.Value = Null
chkSLIExpense.Value = Null
chkCofL.Value = Null
End Sub
Private Sub cmdCancel_Click()
Unload Me
ActiveDocument.Close SaveChanges:=False
End Sub
BUT ..... when I click new or mod nothing changes on the txt box side
Also the clear button, fill the option and check boxes and then greys them, rather than clearing them.
Any help will be greatly appreciated
MTIA
<Do I need A Signature or will an X do?>