Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 5th, 2006, 04:52 PM
Authorized User
 
Join Date: May 2006
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Form's Unbound field question

I have created a table with the following fields:
Type, Total Value

I have created a separated Blank form and inserted an unbound field.

Here is what I am trying to do:

In the form, I want the unbound field to reflect the Total Value based on the type field.

For example,
Type Total Value
607 900
608 100
607 100

I want the separate form’s unbound field to show the value of all the 607 types which would be 1000.
I have been playing around with the dsum function but it is not working in the unbound field.
I created a query that work but when I try and insert the query into the field control source I am getting errors.
I know that I am close but don’t think I am getting it.


EB
__________________
EB
 
Old June 6th, 2006, 06:48 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

How many types and values are you working with here?

Why don't you bind the form to the table and then just show the total value when the type is selected? Just lock and disable the total value field if you don't want the data changed. Do we need more info?

HTH

mmcdonal
 
Old June 6th, 2006, 07:23 AM
Authorized User
 
Join Date: May 2006
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Am I able to bind the field to more than one form? I have this field bound to another form. Will it cause a problem with my other form?

EB
 
Old June 6th, 2006, 07:25 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Nope, bind away. What are you trying to do with them?

mmcdonal
 
Old June 6th, 2006, 07:37 AM
Authorized User
 
Join Date: May 2006
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am just trying to show a total value of a certain type. Kind of like an inventory of how many of one type that there are in the db.
My query looks like this:

SELECT Sum([TotalCount]) AS Total
FROM [Ticket Inventory]
WHERE ((([Ticket Inventory].TicketType)="607"));

EB





Similar Threads
Thread Thread Starter Forum Replies Last Post
Form's calculated field not working properly PaulJH Access 11 March 5th, 2007 09:52 AM
unbound field in a form zanza67 BOOK: Access 2003 VBA Programmer's Reference 0 September 3rd, 2005 01:46 PM
Unbound field lee27 VB Databases Basics 1 January 5th, 2005 07:53 AM
Question about form's design view reindeerw Access 15 April 12th, 2004 11:33 PM
How to bind unbound field ? cjordan BOOK: Professional Crystal Reports for VS.NET 1 January 23rd, 2004 01:34 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.