J
James
Right ok I have been given the following code to stop all
the records being produced on the form when opened and I
would like to know what exactly the explinaton below means:
I'd approach your first issue with an 'Unbound' form and
Right I will tell you about the set-up...
I am trying to create a Search form and I have three
subforms. I have a combo box whoch dependant on its value
opens the relevant subform. Now then one of the subforms
has the problem described above where as the other two do
not. So I have the subforms set-up so that everything is
disabled and when you put a tick in the chkbox it enables
the relevant field. so that then I search on that
particular field and then I click the search button which
has the following code:
FilterMe = "[id] > 0"
Thats an example of one of the combo boxes on one of the
subforms.
Any help would be greatly appreciated.
James
the records being produced on the form when opened and I
would like to know what exactly the explinaton below means:
I'd approach your first issue with an 'Unbound' form and
controls. That means the form doesn't have
a 'RecordSource', and the controls don't have
a 'ControlSource'. Enter your information into the
unbound fields and click on a command button to write the
info to your table. Use something similar to the
following as the On_Click event sub procedure...
Private Sub CommandButtonName_Click()
Dim rst as DAO.Recordset
Set rst = CurrentDb.OpenRecordset(dbOpenDynaset)
With rst
.AddNew
!Field1 = Me!1stControlName
!Field2 = Me!2ndControlName
!Field3 = Me!3rdControlName
.Update
End With
rst.Close
Set rst = Nothing
Me!1stControlName = Null
Me!2ndControlName = Null
Me!3rdControlName = Null
MsgBox "Record has been written."
End Sub
Right I will tell you about the set-up...
I am trying to create a Search form and I have three
subforms. I have a combo box whoch dependant on its value
opens the relevant subform. Now then one of the subforms
has the problem described above where as the other two do
not. So I have the subforms set-up so that everything is
disabled and when you put a tick in the chkbox it enables
the relevant field. so that then I search on that
particular field and then I click the search button which
has the following code:
FilterMe = "[id] > 0"
DoCmd.ApplyFilter , FilterMeIf chkcisco1 Then FilterMe = FilterMe & " AND [Forname]
= " & cbocisco1
Thats an example of one of the combo boxes on one of the
subforms.
Any help would be greatly appreciated.
James