more combo box problems

tina hayes

Registered User.
Local time
Today, 00:15
Joined
Jul 28, 2004
Messages
37
I have been looking at setting values in combo boxes by clicking the radio buttons.
MILe –o-pjhile helped me to get to where I am now and thankyou for that

BUT, a small problem has occured

Basically I have a set of combo boxes one which is names permanent and the others which are number of years.
When setting up the record what I wanted was if the permanent raio button was checked that permannet be selected from the combo box. If any other were selected for it to display non permanent.,

This now happened by the only problem I have now is that I have scroll buttons to take me to next record and then last record. Before I made this change what was in the combo box when you saved it the record was displayed in the combo box as you scroll through. But now what ever you selected by using the radio buttons stays with every record.

I have it set up as the option group which, the buttons sit in has a default value of 1.
The combo box has a row source type of list and the row source holds the four values.
The codee behind the option group is as follows
Private Sub Retention_AfterUpdate()

If Me.Retention = 1 Then
Me.CmbReason = Me.CmbReason.ItemData(0)
Else
Me.CmbReason = Me.CmbReason.ItemData(1)
End If
End Sub

Can any one help me this situation please
 
also

the code i have behond the scroll button is as follows

maybe i need to add some code to this to make it look at the value stored in the table

Private Sub Next_Record_Click()
On Error GoTo Err_Next_Record_Click

Dim answer As Integer

If Nz(Forms![Main Form]![RMD Marks subform]![RMDATE].Value) = "" And Nz(Depositdate.Value) <> "" Then

answer = MsgBox("Don't forget to fill-in the box-review information before continuing!", vbOKCancel)

If answer = vbOK Then

Else
DoCmd.GoToRecord , , acNext
End If

ElseIf Nz(Forms![Main Form]![RMD Marks subform]![FrameRMD].Value) = "" And Nz(Depositdate.Value) <> "" Then

answer = MsgBox("Don't forget to fill-in the box-review information before continuing!", vbOKCancel)

If answer = vbOK Then

Else
DoCmd.GoToRecord , , acNext
End If

Else

DoCmd.GoToRecord , , acNext

End If

Exit_Next_Record_Click:
Exit Sub

Err_Next_Record_Click:
Resume Exit_Next_Record_Click

End Sub
 

Users who are viewing this thread

Back
Top Bottom