If you want to revisit this try the code
Forms!yourmainformname!frmitinerer.requery
in the OnExit event
If that doesn't work try
Forms!yourmainformname!frmitinerer.refresh
Sometimes when requery doesn't work refresh might.
You seem to be requerying the subform to early to capture the new data.
In the OnClose event of the form "frmrelation", use the following code.
Forms!yourmainformname!frmitinerer.requery
In the OnChange event of the following fields:
[Insurance]
[Price]
[Duration]
[extratotal]
Private Sub YourTextBox_Change()
Forms!YourFormName.Requery
End Sub
You can use the Before Update event to check for FamilyID=0, and if it is then cancel the save and use a Message box to let the user know they need to change the FamilyID
Have you included the primary key in the combobox and the subform?
(Edited:) In the subform. The PK must be in the subform to be able to look up the correct record.
Make sure objects are not hidden.
Right-click the menu at the top of the Navigation Pane, and click Navigation Options.
Under Display options, select the Show Hidden Objects check box.
I saw those macros, and they are confusing.
On a copy of the DB, you could try converting the macros to VBA and then see if you can then understand what it is doing?
As far as SetFormState, go to the VBA editor for the Order details form,
Do a search for "SetFormState" which will lead you to...
From what I can see they use a combination of things.
In the OnCurrent event (VBA) they might use AllowEdits = False
Or
They might lock the detail section.
You will have to go through the Visual Basic of the forms to see what method they may be using.
It would help to know the name of the form...
I don't have access to the Northwinds DB right now but,
Open form in design view.
Make sure AllowEdits = Yes
or
If you want to trigger it in VBA
You might want to add a command button and in the OnClick event of the button add:
Me.AllowEdits = True
I'm not sure if I am answering your question correctly , but, if you turn off your record selector & navigation buttons, the delete key should then only work in a text box for editing the record.
Hope this helps.
You can use the On Timer Event to do a requery of the form
and, the Timer Interval to tell the event how often to trigger.
(Timer Interval is in miliseconds)
But, be careful about setting the Interval to low or it will cause a lot of screen flicker and possibly interfere with other events.
If you go into the subform properties and make
Allow Edits = No
Allow Deletions = No
Then you will not be able to change any info in the subform, if that is your intent.
You will probably have to use if statements to check for the existence of the correct directories, starting from latest version to earliest version. Try this for starters.
http://devio.wordpress.com/2012/02/16/test-if-directory-exists-in-batch-file-cmd/
You need to use the # sign delimeter around your date
Private Sub ArrDateSearch_Exit(Cancel As Integer)
' Search for booking using arrival date after exit
If IsNull(ArrDateSearch) Then
GoTo Exit_ArrDateSearch_Exit
Else
On Error GoTo SearchError_Click
Me.Filter = "[Arrival Date] = #" &...