Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
I know its been asked b4, but help!
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
John Hickey  
View profile  
 More options Jan 29 2000, 3:00 am
Newsgroups: comp.databases.ms-access
From: jhickey...@revestne.com (John Hickey)
Date: 2000/01/29
Subject: I know its been asked b4, but help!

I have a Main Form called "Item Number" and two sub forms, "Shipped
jobs" and "back ordered jobs".  Both subforms have a calculated
control in their respective footers that sum the "quantity" of the
item.

On the main form I want to add the quantities together in a control.
Of course everything works great provided totals exist in both
subforms.

If one of the subforms contains no data for the particular item, I get
error# in the main form control.  I have been playing with the NZ and
IIFs and anything else I thought would work but nothing seems to make
it work.

Can anyone help?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Reid  
View profile  
 More options Jan 29 2000, 3:00 am
Newsgroups: comp.databases.ms-access
From: mr...@mgfairfax.rr.com (Mike Reid)
Date: 2000/01/29
Subject: Re: I know its been asked b4, but help!
John,

Can you post a extract/snippet of the code/function your using so
people can see and advise.

On Sat, 29 Jan 2000 19:02:06 GMT, jhickey...@revestne.com (John


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Don Leverton  
View profile  
 More options Jan 30 2000, 3:00 am
Newsgroups: comp.databases.ms-access
From: "Don Leverton" <nospam_lever...@telusplanet.net>
Date: 2000/01/30
Subject: Re: I know its been asked b4, but help!
Hi John,

I renamed your main form and subforms in this example for clarity (using
Hungarian Notation, a popular naming convention... i.e. "frm" prefix for
main forms and "sbf" prefix for subforms...Also, no spaces in object or
field names) ...
I hope you don't mind..

Use an unbound textbox called "txtTotalItems" on "frmItemNumber" with
something like this for its source code:
=nz([sbfShippedJobs].[Form]![TotalShipped])+nz([sbfBackOrders].[Form]![Tota l
BackOrdered])

You should also have something like this as a control source for the
"totals" textboxes in each subform's footer:
=Sum(Nz([QtyShipped],0))
=Sum(Nz([QtyBackOrdered],0))

That, I believe, should do it!

HTH,
Don

John Hickey <jhickey...@revestne.com> wrote in message

news:389337dd.27132582@NEWS.EROLS.COM...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pop3.btclick.com  
View profile  
 More options Jan 30 2000, 3:00 am
Newsgroups: comp.databases.ms-access
From: "pop3.btclick.com" <tbell...@btclick.com>
Date: 2000/01/30
Subject: Re: I know its been asked b4, but help!
John,

Either try if Isnull(me!vblname) then
                    docmd cancelevent
                endif
(I suppose that you have) or safest method, default all numeric fields to 0
and make them requried so that the user cannot wipe out a value.  Do this at
table level) This method is very safe and you will not get nulls.

Tricia

--
CV and summary  enclosed. Available 20/01/2000 . Rate £30 ph approx.

References from
Alan Tilanus, Department Head Technical Support, Best International Group
0171 300 9000
Stuart Walker, Principal Engineer one2one 0181 214 2057
Ronnie Thompson, Design and Planning Compass Group UK PLC
0181 741 8900
Annette Cameron Project Manager, Computacenter 01908 206292
Pete Fox Manager Proposals Dept, ABB Industrial Systems, 01438 781934

Project managers can assess my technical competence directly as I always
bring documentation(VBA code I have written and other documents) where the
previous client has given permission to do so.

Regards

Tricia Belling

John Hickey <jhickey...@revestne.com> wrote in message

news:389337dd.27132582@NEWS.EROLS.COM...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jan van Balkom  
View profile  
 More options Jan 30 2000, 3:00 am
Newsgroups: comp.databases.ms-access
From: "Jan van Balkom" <Jan.van.Bal...@BRIGHT-Software.nl>
Date: 2000/01/30
Subject: Re: I know its been asked b4, but help!
The code provided by Don Leverton will still give you the #error message in
your field, when there is no data in the sub-form. You have to use
SubForm.Nodata to check if the subform contains data. If not you can do
whatever you like to do at that moment.

Kind regards,

Jan.van.Bal...@BRIGHT-Software.nl

Don Leverton <nospam_lever...@telusplanet.net> schreef in berichtnieuws
5kOk4.96293$n3.1980...@news0.telusplanet.net...

> Hi John,

> I renamed your main form and subforms in this example for clarity (using
> Hungarian Notation, a popular naming convention... i.e. "frm" prefix for
> main forms and "sbf" prefix for subforms...Also, no spaces in object or
> field names) ...
> I hope you don't mind..

> Use an unbound textbox called "txtTotalItems" on "frmItemNumber" with
> something like this for its source code:

=nz([sbfShippedJobs].[Form]![TotalShipped])+nz([sbfBackOrders].[Form]![Tota l


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Don Leverton  
View profile  
 More options Jan 31 2000, 3:00 am
Newsgroups: comp.databases.ms-access
From: "Don Leverton" <nospam_lever...@telusplanet.net>
Date: 2000/01/31
Subject: Re: I know its been asked b4, but help!
Hi Jan,

What version of Access are you using?
I can't seem to find a  "NoData" for subform, and "NoData" doesn't fire in a
sub-report in Access97. (Subreports require the use of ".HasData" instead.)

Incidentally, I *don't* get " #Error" 's on my main form / dual subform
either....

This is copied and pasted from Help:
=========================================================================== =
====
The NoData event occurs after Microsoft Access formats a report for printing
that has no data (the report is bound to an empty recordset), but before the
report is printed. You can use this event to cancel printing of a blank
report.

Remarks

To run a macro or event procedure when this event occurs, set the OnNoData
property to the name of the macro or to [Event Procedure].
If the report isn't bound to a table or query (by using the report's
RecordSource property), the NoData event doesn't occur.
This event occurs after the Format events for the report, but before the
first Print event.

This event doesn't occur for subreports. If you want to hide controls on a
subreport when the subreport has no data, so that the controls don't print
in this case, you can use the HasData property in a macro or event procedure
that runs when the Format or Print event occurs.
The NoData event occurs before the first Page event for the report.
=========================================================================== =
====

Jan van Balkom <Jan.van.Bal...@BRIGHT-Software.nl> wrote in message
news:8725dh$p78$1@porthos.nl.uu.net...

> The code provided by Don Leverton will still give you the #error message
in
> your field, when there is no data in the sub-form. You have to use
> SubForm.Nodata to check if the subform contains data. If not you can do
> whatever you like to do at that moment.

> Kind regards,

> Jan.van.Bal...@BRIGHT-Software.nl

<Previous threads snipped> DL

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »