473,394 Members | 1,840 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Function Module and [Forms]!

This is a bit strange, but I seem to be unable to extract a Function
result and have it to post into a control on a form in Access 97. I
have done something similar in the past and it has worked fine. What
could be different?

The Function returns the results of totalling a list of items in a
subform which is linked to a main form. The correct total appears on
the subform control by using =GetTotal([IDSales]), field name
TotalSales. So in a field on the main form I'm using a control source
=[Forms]![frmMain]![sfrmSales]![TotalSales] which should show the
total, but it does not - instead #Name? Yes, I have double checked the
spelling.

Does anyone have any ideas as to how to make this work? Thanks for
your time and assistance. Dalan
Nov 12 '05 #1
1 3481
Try:
=[Forms]![frmMain]![sfrmSales].[Form]![TotalSales]
If the ".Form" bit needs explaining, see:
Referring to Controls on a Subform
at:
http://members.iinet.net.au/~allenbrowne/casu-04.html

If that still does not work:
1. Open the main form in design view.
2. Right-click the edge of the subform control, and choose Properties.
3. Check the Name property.
The Name of a subform control may be different to the name of the form it
contains (its SourceObject).

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Dalan" <ot***@safe-mail.net> wrote in message
news:50**************************@posting.google.c om...
This is a bit strange, but I seem to be unable to extract a Function
result and have it to post into a control on a form in Access 97. I
have done something similar in the past and it has worked fine. What
could be different?

The Function returns the results of totalling a list of items in a
subform which is linked to a main form. The correct total appears on
the subform control by using =GetTotal([IDSales]), field name
TotalSales. So in a field on the main form I'm using a control source
=[Forms]![frmMain]![sfrmSales]![TotalSales] which should show the
total, but it does not - instead #Name? Yes, I have double checked the
spelling.

Does anyone have any ideas as to how to make this work? Thanks for
your time and assistance. Dalan

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bobbak | last post by:
Hello All, I was wondering if it is possible to do this; I have a form that has number of text boxes that when a button is clicked it turns into combo boxes, simply by toggling the visibility to...
1
by: Rolan | last post by:
I created a function module base on a query to provide a group record total for a subform and which is posted to a field on the main form. Everything seems to work fine except that I consistently...
2
by: Wilder | last post by:
I wrote a simple funtion to automatically compute corrected azimuths in several places in a database but am having trouble implementing it. I placed the function in a module and am trying to pass...
5
by: Alan Brasel | last post by:
This is the first time that I have tried to use a function as the default value for a form. The function appears to work when I run it in VBA, and I have saved it and it shows up in my Module...
6
by: Steve Strik | last post by:
Hi, I'm using access 97 SR2 on win XP and keep getting the Sub or Function not defined error message. The code for the function is in a module called mod_Public and is as follows. Function...
3
by: Richard Hollenbeck | last post by:
Back in the old days before I started learning about menubars (the day before yesterday,) I based all my operations on command buttons on the forms. Now the forms are all cluttered up with buttons...
2
by: Steve | last post by:
What is the syntax to call Public Function MyFunction(parm1, parm2) in MyForm's module from a function in a standard module? Thanks, Steve
2
by: DavidGeorge | last post by:
I'm having trouble with what seems like a very simple function, although it's the first I've used in Access so I could have it all mixed up. It still works fine in forms I designed until...
9
imrosie
by: imrosie | last post by:
Hello, I have a form(PrintPreviewInvoices) that displays past invoices (in a listbox). I added a combo box control in order to filter timeframes;(today, this week, last week, this month, last...
6
by: RandomElle | last post by:
Hi there I'm hoping someone can help me out with the use of the Eval function. I am using Access2003 under WinXP Pro. I can successfully use the Eval function and get it to call any function with...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
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,...
0
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.