how to prepare a form in excel so that it gets saved in the database
and we can fill it and send it to the database. and we can retrieve it
for future reference?
You make a field of tyoe OLE in a table. Make a form with this field.
Properties should be:
OLEType-Embedded
Sizemode Clip
DisplayType Icon
-Of course here you can play a little!
Make a button with this code:
Private Sub Command4_Click()
On Error GoTo Err_Command4_Click
With Me!OLE
.Enabled = True
.Locked = False
.Verb = acOLEVerbOpen
.Class = "Excel.Sheet"
.Action = acOLECreateEmbed
.Action = acOLEActivate
End With
Exit_Command4_Click:
Exit Sub
Err_Command4_Click:
MsgBox Err.Description
Resume Exit_Command4_Click
End Sub
Where OLE is the name of the control in your form.
-To make a new sheet - click the button
-To open an existing one doubleclikk the control
Sincerely
Hans Kristian Eide