Radio Button blank but Test is highlited

H

Harrison

I have two radio buttons with two command buttons on a form.
How I set the focus to have radio 1 OptEmployee selected not radio 1 caption ?
radio 1 = OptEmployee
radio 1 caption = "Employee" lblEmployee
radio 2 = OptDepartment
radio 2 caption = "Department" lblDepartment

VBA Code on this form is as follows>>>
Option Compare Database

Private Sub Cancel_Click()
DoCmd.Close acForm, "frmTransfer", acSaveNo

End Sub

Private Sub Form_Load()
[Transfer to EmployeeID].Value = ""
[Transfer to DepartmentID].Value = ""

End Sub

Private Sub OptDepartment_GotFocus()
[Transfer to EmployeeID].Enabled = False
[Transfer to EmployeeID].Value = ""
[Transfer to DepartmentID].Enabled = True


End Sub

Private Sub OptEmployee_GotFocus()
[Transfer to EmployeeID].Enabled = True
[Transfer to DepartmentID].Value = ""
[Transfer to DepartmentID].Enabled = False

End Sub

Private Sub Save_Click()
DoCmd.SetWarnings False
' SQL to transfer current record fields to transfer table
Dim db As DAO.Database
Dim strSQL As String
Set db = CurrentDb()
strSQL = "INSERT INTO Transferred (QuestionID, EmployeeID, "
strSQL = strSQL & "DepartmentID, CustomerID, "
strSQL = strSQL & "CallCodeID, Status, Severity ) "
strSQL = strSQL & "VALUES ( "
strSQL = strSQL & [Forms]![frmStartup]![QuestionID].Value
strSQL = strSQL & ", " & [Forms]![frmTransfer]![Transfer to
EmployeeID].Value
strSQL = strSQL & ", " & [Forms]![frmTransfer]![Transfer to
DepartmentID].Value
strSQL = strSQL & ", " & [Forms]![frmStartup]![CustomerID].Value
strSQL = strSQL & ", " & [Forms]![frmStartup]![CallCode].Value
strSQL = strSQL & ", " & [Forms]![frmStartup]![Status].Value
strSQL = strSQL & ", " & [Forms]![frmStartup]![Severity].Value
strSQL = strSQL & ") "
'strSQL = strSQL & "WHERE
(((Question.QuestionID)=[Form]![frmStartUp]![QuestionID]));"
db.Execute strSQL, dbFailOnError
db.Close
Set db = Nothing

DoCmd.Close acForm, "frmTransfer", acSaveNo

'Clear field values - Owner/Department
[Forms]![frmStartup]![Employee Working Issue].Value = ""
[Forms]![frmStartup]![Department Working Issue].Value = ""

DoCmd.SetWarnings True
DoCmd.Beep

End Sub
 

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