| re: please help
You'll have to do this with code. Make sure you have a reference set
to DAO (Tools -> References; put a checkmark in Microsoft DAO 3.6).
In the form's declaration section type:
Public Const cDestinationTable = "MyTable"
'Replace MyTable with name of destination table
Public Const cDestinationField = "MyField"
'Replace MyField with name of field in destination table
In the button's onclick event, type (air code):
Dim db as DAO.Database
Dim rec as DAO.Recordset
Dim conMyControl as Control
conMyControl = me.MyControl 'Change MyControl to the control with
the value
Set db = CurrentDB()
With db
Set rec = .OpenRecordSet(cDestinationTable)
With rec
.AddNew
.Fields(cDestinationField) = conMyControl
.Update
.Close
End With
.Close
End With
Set rec = Nothing
Set db = Nothing
Right click on the button you are programming and select Build Event,
then code builder, to get to the buttons onclick event. The
declarations section is the whitespace at the top of this window below
any option statements (Option Explicit, Option Compare Database, etc.)
This should get you started, but please ask any follow-up questions you
need.
Johnny |