I have a subform named "sbfrmParts " with a list of parts along with the
quantity and price. I have used a text box in the subform's footer and set
the control source to "=Sum([NET PRICE]*[Quantity])". I set the format to
display currency. This text box is called "SubformTot al", and is visible
property is set to "No". On the main form I have made another text box and
set its control source to "=[sbfrmParts].Form!SubformTo tal".
When I enter some parts everything works perfectly until I look at the text
box on the main form. It only displays "#Error".
What is wrong?
Any suggestions?
Shannan Casteel
--
Message posted via AccessMonster.c om http://www.accessmonster.com/Uwe/For...ccess/200508/1
Nov 13 '05
30 8911
Tim,
The subform is based on a query, by the way. Don't know if that matters.
Shouldn't they all be based on queries...Maybe not.
Shannan
Shannan Casteel wrote: Tim,
Now I get an error that reads "#Name".
Shannan
The name of the control that holds the subform is also sbfrmParts.
[quoted text clipped - 7 lines] Hopefully that will work...
--
Message posted via AccessMonster.c om http://www.accessmonster.com/Uwe/For...ccess/200508/1
Shannan Casteel via AccessMonster.c om wrote: Tim,
The subform is based on a query, by the way. Don't know if that matters. Shouldn't they all be based on queries...Maybe not.
You can take the SQL from the SQL view of the query designer and plop
that into the record source, instead of a query name. I prefer this
whenever possible as it cuts down on the number of queries that need to
be managed. Indeed, if you're distributing an application, mde or mdb,
that is not secured, users can go into the queries tab and mess up your
queries (deliberately for some usually valid purpose or accidentally
like the sort of people who can't do anything with a software except
find ways to accidentally mess things up! 8) ) so I find putting the
SQL ino the recordsource preferable, unless I manipulate the SQL of a
saved query every time a form opens.
And of course, you can also have what are called "unbound" forms, ie,
not "bound" to any SQL statement or query/table.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Shannan Casteel via AccessMonster.c om wrote: Tim,
Now I get an error that reads "#Name".
Without seeing your app, there's definitely something there that seems
to be playing havoc with your desired results. I'm still leaning
towards naming of controls as the bad thing.
How big is your mdb when you compact it? I could have a peek at it if
you can email it - my address is tucked away (and munged - you need to
remove "scumspamme r") in my web site below (don't mind the silliness of
the site - it's not a computer site) on the contact information link.
Let me know here or email me first as to the size of your file BEFORE
YOU SEND ANYTHING and I need ample warning - there's only a particular
time of day I can accept large (ie, greater than a few kb, yes, kb)
files at work - on home I'm on dial up that never gets faster than 26
kps. And I can't guarantee I'll find the problem - I'll only look for
the obvious areas I suspect.
Of course, you also realize, I'll probably rip into you mercilessly via
email about your structure if your other thread I've responded to is any
indication, Tee hee. 8) 8)
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Tim,
My application is 35 Mb.
Shannan
Tim Marshall wrote: Tim,
Now I get an error that reads "#Name".
Without seeing your app, there's definitely something there that seems to be playing havoc with your desired results. I'm still leaning towards naming of controls as the bad thing.
How big is your mdb when you compact it? I could have a peek at it if you can email it - my address is tucked away (and munged - you need to remove "scumspamme r") in my web site below (don't mind the silliness of the site - it's not a computer site) on the contact information link.
Let me know here or email me first as to the size of your file BEFORE YOU SEND ANYTHING and I need ample warning - there's only a particular time of day I can accept large (ie, greater than a few kb, yes, kb) files at work - on home I'm on dial up that never gets faster than 26 kps. And I can't guarantee I'll find the problem - I'll only look for the obvious areas I suspect.
Of course, you also realize, I'll probably rip into you mercilessly via email about your structure if your other thread I've responded to is any indication, Tee hee. 8) 8)
--
Message posted via AccessMonster.c om http://www.accessmonster.com/Uwe/For...ccess/200508/1
Go to Tool on the menu bar choose Database Utilities and then Compact and
Repair database. This will compact the database to a smaller size. Then use
a zip compression utility (ie winzip) to compress it more and send that file
off to Tim.
"Shannan Casteel via AccessMonster.c om" <fo***@AccessMo nster.com> wrote in
message news:53******** ***@AccessMonst er.com... Tim,
My application is 35 Mb.
Shannan
Shannan,
Create a new file and import the form, tables, and queries needed to make
this form work. Zip it and send it to me at co*****@hotmail .com and I'll
take a look at it. If the data in the table(s) is sensitive, just import the
table structure, not the data.
--
Wayne Morgan
MS Access MVP
"Shannan Casteel via AccessMonster.c om" <fo***@AccessMo nster.com> wrote in
message news:53******** ***@AccessMonst er.com... The name of the control that holds the subform is also sbfrmParts.
Shannan
Wayne Morgan wrote:I probably misspoke on the brackets, although on mine they aren't there. There is one control you've left off, what is the name of the subform control on the main form? This control holds the subform and its name may or may not be the same as the subform itself. This control is where you set the Parent/Child Link fields.
Wayne, [quoted text clipped - 11 lines] What's wrong?
-- Message posted via AccessMonster.c om http://www.accessmonster.com/Uwe/For...ccess/200508/1
Jeff Smith wrote: Go to Tool on the menu bar choose Database Utilities and then Compact and Repair database. This will compact the database to a smaller size. Then use a zip compression utility (ie winzip) to compress it more and send that file off to Tim.
Thanks Jeff,
Yes, 35 megs is a bit big for email! The other thing you could try to
do after doing the compact and repair Jeff describes is if the file is
still over 10megs (probably the limit I'd want to download here at
work), try deleting the tables that aren't needed to display this
particular issue and/or deleting a pile of records. Then compact &
repair once again...
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Hey guys,
I sent the file to both of you. I hope it's small enough. If it's not let
me know and I'll try to fix it. Once again, thanks for your help.
Shannan
Wayne Morgan wrote: Shannan,
Create a new file and import the form, tables, and queries needed to make this form work. Zip it and send it to me at co*****@hotmail .com and I'll take a look at it. If the data in the table(s) is sensitive, just import the table structure, not the data.
The name of the control that holds the subform is also sbfrmParts. [quoted text clipped - 13 lines] What's wrong?
--
Message posted via AccessMonster.c om http://www.accessmonster.com/Uwe/For...ccess/200508/1
Hey,
I GOT IT TO WORK FINALLY!!!!!!
I was reading in the developer's handbook that you can take a form and drag
it on top of another to create a subform. Previously I had used the tool box
to create the form, and for some reason it didn't like that. Everythings
good now. Thanks for everyone's help.
Shannan
Shannan Casteel wrote: Hey guys,
I sent the file to both of you. I hope it's small enough. If it's not let me know and I'll try to fix it. Once again, thanks for your help.
Shannan
Shannan, [quoted text clipped - 8 lines]> > What's wrong?
--
Message posted via AccessMonster.c om http://www.accessmonster.com/Uwe/For...ccess/200508/1
When you drag and drop the form onto the other form to create the subform,
the subform CONTROL on the main form gets the same name as the subform. When
you create the control by yourself, it does NOT. So the problem has probably
been the wrong name for the subform control in the code.
--
Wayne Morgan
MS Access MVP
"Shannan Casteel via AccessMonster.c om" <fo***@AccessMo nster.com> wrote in
message news:53******** ***@AccessMonst er.com... Hey,
I GOT IT TO WORK FINALLY!!!!!!
I was reading in the developer's handbook that you can take a form and drag it on top of another to create a subform. Previously I had used the tool box to create the form, and for some reason it didn't like that. Everythings good now. Thanks for everyone's help. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Allen Browne |
last post by:
Subform is based on a single-table query that contains a calculated field:
Amount: Round(CCur(Nz(*,0)),2)
Continuous subform displays this field in a text box named Amount.
As user enters new rows into subform, all rows show #Error in this box.
This only happens until they close the form, or move the main form to a
different record.
Worse, it only happens on the client's machine in the MDE.
The identical MDB file shows the calculation...
|
by: chris vettese |
last post by:
I've been having trouble with this for a long time. I have a form
that has many subforms. In the subforms I have unbound text boxes in
the footer that sum a field. I want to Display this sum on the main
form for each subform and then add them all together. In a book I
have it gives the following example:
=(Object type!!.Form!)
I created an unbound text box on my main form and filled in the
information in the example above and get a...
|
by: Ellen Manning |
last post by:
I've got an A2K form with a subform based on a query. This query has
a checkbox and an amount field and returns records if checkbox is
checked. I Dsum the amount field and display on the main form. If
the user unchecks the box, I want the corresponding amount subtracted
from the total. If they recheck the box, the amount is to be added.
I want all records to appear on the subform even after unchecking
them. This works fine...except......
|
by: Lyn |
last post by:
Hi,
I am working on a genealogy form. The only table (so far) lists everybody
in the family, one record per person. Each record has an autonum ID.
The parent form (frmMainForm) displays the data in each record, which
includes the ID of the father and the mother (who also have records in the
table). One record per form.
I have a Tab Control in the form, and in one of the tabs I have a subform
(sfmSiblings) in which I wish to list...
|
by: tconway |
last post by:
I have an Access program that displays Customer data into a form and
OrderID data into a subform. The totals in the Subform are based on
calculated fields, i.e. the Total Amount field Calculates the
following: =*
The Subform Order fields are pulled from a Query along with each
calculated Total. They are displyed in a DataSheet View.
This works fine on my developement environment which includes a server
set up just as our client has. ...
| |
by: Mark |
last post by:
Hi all,
I'm completely new to access and am trying to create a simple form/subform.
The main form will include:
employee_number,
forename,
surname,
total_leave,
leave_remaining (to be calculated)
|
by: jburris |
last post by:
I have been through enough of these threads to think that this should
be an easy fix... but, are there circumstances in which the following
code syntax does not work?
=!!.Form! (this is
out of the Access bible)
Specifically, I am adapting the Orders database from the Access
templates for my use. I deleted the payments table and am recording
them as a field in the Order Details table so that
payment is directly tied to each product...
|
by: Bruce |
last post by:
Hi,
I have 3 nested forms and wish to calculate a value on Subform 1 by
adding 2 values on the same subform + to a value in a
control on the footer of the underlying subform
. I use this as the recordsource for my total
=.Form!Sumpd++)
which works well except when there are no records in the
transactiontbl subform - I get an error.
|
by: Jimmy Stewart |
last post by:
I want to use a calculated function for the caption on my tab controls. I
used the following code:
Me.Page28.Caption = "Expenses & "]"
This should display the following: " Expenses " where 10 is the number
of expenses on that page. On my form I have a calculated control named
'ExpenseEntryCount' that correctly displayd this information.
If I place this code in the forms OnOpen, OnActivate or OnCurrent event,
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |