Dear Richard
I have now
[Forms]![customers]![billsopenvalue].Requery
It's not 100% working. If I change the field in my payments form for the
first time the form billsopenvalue is not updated immidiately. If I put
another payment into the payment form I see the up-date from the first input
- but I would like to see the update immidiately processed.
Any idea what I do wrong?
Thanks
Klaus
> Hi Klaus,
>
[quoted text clipped - 72 lines]
> > > > Thanks
> > > > Klaus
Ofer Cohen - 21 May 2007 13:16 GMT
Open the F_receivedpayments form as Dialog, so the code will pause until you
close the receivedpayments form, and then run the requery to refresh the sub
form
Docmd.OpenForm "receivedpayments",,,,,acDialog
Me.[billsopenvalue].Requery

Signature
Good Luck
BS"D
> Dear Richard
>
[quoted text clipped - 85 lines]
> > > > > Thanks
> > > > > Klaus
Amateur - 21 May 2007 13:30 GMT
Hi Ofer
can you tell me how to open my receivedpayment form as Dialog?
> Open the F_receivedpayments form as Dialog, so the code will pause until you
> close the receivedpayments form, and then run the requery to refresh the sub
[quoted text clipped - 92 lines]
> > > > > > Thanks
> > > > > > Klaus
Ofer Cohen - 21 May 2007 13:35 GMT
Do you have a command button on the customers form that open receivedpayment
form?
If you do, then in the previous post there is an example how to

Signature
Good Luck
BS"D
> Hi Ofer
> can you tell me how to open my receivedpayment form as Dialog?
[quoted text clipped - 95 lines]
> > > > > > > Thanks
> > > > > > > Klaus
richard harris - 21 May 2007 13:19 GMT
Hi klaus,
you would not requery the field, just the form. if there is a subform then
you would need to requery the subform as follows
[forms]![mainform]![subform]
a good way to add payments would be to have a command on your main form
which when clicked would open a new form to recieve the data entry. once
entered upon closing the data entry form the main form would be requeried
(create a small form to accept the data you want, include the id number
linked to the main form)
sometihng like
private sub cmdopenform_click()
dim stdoc as string
stdoc ="the form you want to enter the data in to"
docmd.openform, stdoc, , , acnormal, acadd
end sub
this will open the form in add mode
then you need a before insert event on the form to take the id ref number
from the main form to the sub form, this will ensure the record is attached
to the correct master record
private sub your data form_beforeinsert()
With Forms![your main form]
If Not IsNull(!your id autonumber) Then
Me.your id autonumber= !your id autonumber
End If
End With
end sub
then once you have entered all your data you need to close the from, the
best thing to do is have a command to save and close with code as follows
Private Sub cmdcloseSave_Click()
On Error GoTo Err_cmdcloseSave_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "your main form name"
stLinkCriteria = "[your id number]=" & Me![your id number]
Select Case True (you can use this to ensure all fields are filled in or
ignore the case select)
Case IsNull(your field name)
MsgBox Prompt:="You have not entered...."
Case IsNull(your field name)
MsgBox Prompt:="You have not entered...."
Case Else
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenForm stDocName, , , stLinkCriteria
[Forms]![your main form].Requery
DoCmd.Close acForm, "the name of your add data form", acSaveYes
End Select
Exit_cmdCloseSave_Click:
Exit Sub
Err_cmdCloseSave_Click:
MsgBox Err.Description
Resume Exit_cmdCloseSave_Click
End Sub
i hope this all makes sense and will help you achieve what you want to do.
regards richard
> Dear Richard
>
[quoted text clipped - 85 lines]
> > > > > Thanks
> > > > > Klaus