chevyimpala
Programmer
I have 2 option buttons on me form, and each button has a insert that it should perform if it is selected. However when I run my code it says that i have entered a expression that has no value. This is what my code looks like. Can anyone help. THX.
If all.Value = True Then
DoCmd.RunSQL "INSERT INTO FundTBL ([Currency],[Size],[Rate],[Date],[VD],[Account]) VALUES(" & Me.Currency.ControlSource & "," & Me.Size * 0.6222 & "," & Me.Rate & "," & Me.Date.ControlSource & "," & Me.VD.ControlSource & "," & Me.Account.ControlSource & ""
ElseIf db.Value = True Then
DoCmd.RunSQL "INSERT INTO DeutscheTBL ([Currency], [Rate] ,[Size],[Date],[VD],[Account]) VALUES(" & Me.Currency.ControlSource & "," & Me.Dbrate.ControlSource & "," & Me.Size * 0.0505 & "," & Me.Date.ControlSource & "," & Me.VD.ControlSource & "," & Me.Account.ControlSource & ""
end if
If all.Value = True Then
DoCmd.RunSQL "INSERT INTO FundTBL ([Currency],[Size],[Rate],[Date],[VD],[Account]) VALUES(" & Me.Currency.ControlSource & "," & Me.Size * 0.6222 & "," & Me.Rate & "," & Me.Date.ControlSource & "," & Me.VD.ControlSource & "," & Me.Account.ControlSource & ""
ElseIf db.Value = True Then
DoCmd.RunSQL "INSERT INTO DeutscheTBL ([Currency], [Rate] ,[Size],[Date],[VD],[Account]) VALUES(" & Me.Currency.ControlSource & "," & Me.Dbrate.ControlSource & "," & Me.Size * 0.0505 & "," & Me.Date.ControlSource & "," & Me.VD.ControlSource & "," & Me.Account.ControlSource & ""
end if