Ask a Question related to Microsoft Access, Design and Development.
-
Ken Ivins #1
Auto create record in subform NZ is not working
I have a form with participants to an event and their billing information.
On it is a subform for multiple payments to this event. To get a balance due
report I need to have some figure as a payment (even if is zero). How do I
automatically create a record in this subform when ever a participant is
created or is there a better way to do this.
Peter Walker suggested I try the Nz function which sounded good.
I tried the following code on a field on the main form and got an "Object
doesn't support this property or method" error.
Private Sub txbLastNam_AfterUpdate()
Me![sfrmConferencePayment].[txbPaymentAmt] =
Nz(Me![sfrmConferencePayment].[txbPaymentAmt], "0")
End Sub
I assume this is because there is no record created yet, but maybe I'm
wrong. I'm looking for ideas.
Thanks,
Ken
Ken Ivins Guest
-
Stop adding record in subform after record count = 1
Can someone help in in what to put after the THEN statment to allow one entry if the Record count is =>1 in the Before insert or should I set the... -
create a find option to go to a record in a subform
i have a main form which contains a subform,i want it so the user tpes in the data and clicks find, it then automatically should take the user to... -
Auto create record in subform
In the calculation that gets the balances try using the Nz function. Nz(variant) You don't mention how you get the balances. (a VBA function is... -
Go to record in a subform
This example assumes the subform contains a field named "OrderID", and uses the RecordsetClone of the subform to get the value from the last record.... -
create record (in subform) automatically
Hi all I'm beginning to think in the wrong way, so I need help. In an Access 2000 database I have two (very) related tables, Invoices and Amount... -
Mike Painter #2
Re: Auto create record in subform NZ is not working
"Ken Ivins" <ken-27@spa.net> wrote in message
news:OOnt6WyRDHA.1720@TK2MSFTNGP12.phx.gbl...due> I have a form with participants to an event and their billing information.
> On it is a subform for multiple payments to this event. To get a balanceAt some point in the process or before you save the master record> report I need to have some figure as a payment (even if is zero). How do I
> automatically create a record in this subform when ever a participant is
> created or is there a better way to do this.
>
> Peter Walker suggested I try the Nz function which sounded good.
I assume you have an autonumber for the record key.
docomd.runsql "INSERT INTO Billing (ParticipantID,SomeAmountField) VALUES ("
& Me!ParticipantID & ",0);"
Mike Painter Guest
-
Ken Ivins #3
Re: Auto create record in subform NZ is not working
Mike,
With some other coding to get it to save first, this worked.
Thanks,
Ken
"Mike Painter" <mpainteratattdotnet> wrote in message
news:3a80b97e68b0795c907faec4abc3eff7@free.teranew s.com...information.>
> "Ken Ivins" <ken-27@spa.net> wrote in message
> news:OOnt6WyRDHA.1720@TK2MSFTNGP12.phx.gbl...> > I have a form with participants to an event and their billingI> due> > On it is a subform for multiple payments to this event. To get a balance> > report I need to have some figure as a payment (even if is zero). How do(">> > automatically create a record in this subform when ever a participant is
> > created or is there a better way to do this.
> >
> > Peter Walker suggested I try the Nz function which sounded good.
> At some point in the process or before you save the master record
> I assume you have an autonumber for the record key.
> docomd.runsql "INSERT INTO Billing (ParticipantID,SomeAmountField) VALUES> & Me!ParticipantID & ",0);"
>
>
Ken Ivins Guest
-
Mike Painter #4
Re: Auto create record in subform NZ is not working
Not sure what that means. The statement does insert a record and all you
would have to do is refresh the view.
"Ken Ivins" <ken-27@spa.net> wrote in message
news:u2xUas%23RDHA.2676@TK2MSFTNGP10.phx.gbl...balance> Mike,
>
> With some other coding to get it to save first, this worked.
>
> Thanks,
> Ken
>
>
>
> "Mike Painter" <mpainteratattdotnet> wrote in message
> news:3a80b97e68b0795c907faec4abc3eff7@free.teranew s.com...> information.> >
> > "Ken Ivins" <ken-27@spa.net> wrote in message
> > news:OOnt6WyRDHA.1720@TK2MSFTNGP12.phx.gbl...> > > I have a form with participants to an event and their billing> > > On it is a subform for multiple payments to this event. To get ado> > due> > > report I need to have some figure as a payment (even if is zero). Howis> I> > > automatically create a record in this subform when ever a participantVALUES> >> > > created or is there a better way to do this.
> > >
> > > Peter Walker suggested I try the Nz function which sounded good.
> > At some point in the process or before you save the master record
> > I assume you have an autonumber for the record key.
> > docomd.runsql "INSERT INTO Billing (ParticipantID,SomeAmountField)> (">> > & Me!ParticipantID & ",0);"
> >
> >
>
Mike Painter Guest



Reply With Quote

