Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
dim intCountFields as integer
for intcountfields = 1 to 5
me("txtYadda" & intcountfields) = "blah blah blah"
next intcountfields
UPDATE MYTABLE
SET
(
FLD1 = VALUE,
FLD2 = VALUE,
FLD3 = VALUE,
FLD...
)
[\code]
I suspect as Jeremy does that there's something wrong with your schema.
The answer to your problem isn't what you want -- you're probably looking for a more terse language than VBA.
Randall Vollen
National City Bank Corp.
Private Sub frmOptions_AfterUpdate()
Dim ctrl As Control
For Each ctrl In frmOptions.Controls 'controls in frame
If (ctrl.ControlType = 105) Then 'is option box
frmOptions.Controls(ctrl.Tag).BackStyle = IIf(ctrl.OptionValue = Frame2.Value, 1, 0)
End If
Next ctrl
End Sub
Private Sub frameOne_AfterUpdate()
Const newBackColor As Long = vbRed
Dim myOption As Access.Control
For Each myOption In frameOne.Controls
If myOption.ControlType = acOptionButton Then
myOption.Controls(0).BackStyle = 0
If myOption.OptionValue = frameOne.Value Then
myOption.Controls(0).BackStyle = 1
myOption.Controls(0).BackColor = newBackColor
End If
End If
Next myOption
End Sub
Couple of questions:
Is Dim myOption As Access.Control
the same as
Dim myOption As Control