I Want To Avoid Using DSUM In This Form. Dont Know How!

Aug 15, 2005

I have a form based on a lengthy SQL query.

I have several controls in this form whose control Source has the following formula:

=Nz(DSum("Capital","Capital_Act","DatePart('q', CVDate([Capital_Month] & ' 1')) = 1 And [projectid]=" & "'" & [projectid] & "'"),0)


When I navigate from one record to another record in this form, the values in the controls take a looooong time to populate (most of the time they come up as blank and when I move my mouse over that control - the value gets populated....this is slow !!!).

I believe this is happenning because I am using DSUM function all over the form.

What is the fastest way to display this control WITHOUT using DSUM?

Many thanks!

View Replies


ADVERTISEMENT

If Subform Is Blank, Dont Show Main Form..

Oct 4, 2006

My title is a little confusing, i have a form with a subform, what I want it to do is this say i have 10 records, 3 of which are missing any data in the subform... then when i show the form it only shows 7 records. This way all records have data in both the main form and the subform... is this possible?

Thanks

View 1 Replies View Related

Forms :: How To Avoid Creating Extra Empty Records In Input Form

Sep 18, 2014

I always have a problem with input forms in Access in that I usually end up with an empty excess record which is being created because I do not know how to program this correctly.

I have a Purchase Order Receipt form (frmPurchase). When I receive a certain quantity of an article associated with a lot number (or a serial number) I have another input form opening up (frmLotorSerial), passing to it through Openargs, the article and the quantity received.

Say we receive 10 units of which we want to register the serial number, I want the user to be able to enter a maximum of 10 units (could be 10 records if each record = 1 serial number, but it could be less than 10 if we have several units per lot number), and not one more, into this frmLotorSerial.

The record looks like this:
-key
-artno (article)
-recqty (quantity received)
-date
-warehouse
-lot number

I used the lost_focus event on lot number to check whether the total received quantity in this form matches the total passed to it from the Purchase form, and if it does to stop the input. Since I could not close the window in the code of this event (error 2585) I moved the close command to the current event of the form.

Doing this closes the form all right, but it always creates one record extra, which of course does not carry any information, apart from the date which has a default value of now.

How should I program/what events should I use to:
-test that the user should not go any further (total received in frmLotorSerial = total received in frmPurchase)
-close the window and, above all, not create this extra record.

View 2 Replies View Related

Help With Dsum/Query In Form

Feb 21, 2008

Just a quick one,

I have a TextBox in my form, that currently has this DSum in it:
=DSum("QtyAdd","Orders","ProdID")-DSum("QtySub","Output","ProdID")

(ProdID is another TextBox in the form, QtyAdd is from the Orders table, and QtySub is from the Output table)

I'm also wanting to query it with more WHERE statements but finding I can only do this once with a DSum.

I'm wanting to effectively do this:
=DSum("QtyAdd","Orders","ProdID AND StockItem = Yes AND Arrival = Yes")-DSum("QtySub","Output","ProdID AND Dispatch = Yes")

So, WHERE the field StockItem and Arrival = Yes in the Orders table and WHERE Dispatch = Yes in the Output table.

Does anyone know how I can achieve this?

I was thinking an SQL query but don't know how to display a Query into a TextBox.

Thanks.

View 8 Replies View Related

Modules & VBA :: Dsum From Sub Form

Oct 27, 2014

i have an orders form with aorder details sub form.I need a grand total of the order that i need to store in my orders table. Cant seem to make anything to work is this becouse my form is a sub form .Basically i am doing a dsum quantity *sold at price with a where id information.Doi i have to do anything special as the info is in the sub forms table

View 3 Replies View Related

Forms :: DSum Function In Form

Dec 7, 2013

How is the collection of a sum of money to a particular substance.There is, for example, in the table named baby milk product.How can I collect the amounts of such material only.I used a DSum

View 6 Replies View Related

Forms :: DSum On Main Form From Subform

Aug 11, 2015

I have a subform from which I want to calculate values into a text box on the main form, to keep a running total of weeks for individuals. Using the expression builder to just add the fields, I only get the total for the current sub-form record. If another record is added to the subform, the total reverts to zero, and then it takes that record's input as the total. Which makes logical sense.

I think I need to do a 'DSum' from the subform/table, but I'm not sure how to sum for just the current ID/individual. I have tried to bodge it myself with the expression builder, but it tells me that 'the function contains the wrong number of arguments'.

View 6 Replies View Related

Modules & VBA :: Using DSUM To Calculate Sum From Either A Table Or Query To Display On Form

Aug 24, 2013

I am trying to use dsum to calculate a sum from either a table or query to display on a form and this needs to be for different services within a period so I am using the following:

Code:
Me.txtTotalEarnings = DSum("Price", "KatiesPeriodTakings", "AppDate" >= CDate([Forms]! _&
[frmKatiesTakings]![txtStartDate]) And "AppDate" _&
<= CDate([Forms]![frmKatiesTakings]![txtEndDate]))

But I keep getting a mismatch error

The Query is called KatiesPeriodTakings
The field I want totalled is called Price
The date field is AppDate and the 2 controlling dates are the Startdate and EndDate from the Form

View 5 Replies View Related

Just Dont Add Up

Mar 7, 2006

heres one that just don't add up
from the beginning,
i've got a form that puts data into a table from a text box named txtcomments, the table allows 255 chars to be stored the comments are show later using a copy of the input form, all this works great. now i'm taking this data and inserting it into another table using sql inset in the vb editor so i can play with it and leave the original in tact everything works fine on my test machine but when i transfere the database to the server i am only permitted to enter 127 chars in the text box i've narrowed it down to the sql statement and know that where the error is occuring ive tried deleting things and reinstalling im just going round in circles and when i transfere the database back to the test machine everything works fine the test machine uses access 2003 but the server uses 2000 this is the only differance

any help would be god like

john

ps sql statement as follows looks fine to me,

DoCmd.RunSQL "INSERT INTO tblHistory VALUES([txtcomments]);"

View 3 Replies View Related

I Dont Get It....

Apr 28, 2006

Been using simple access for a while now, and this problem is new on me...

Ive got two tables. One has data listed by OLD MATERIAL number (material) and the other has the new Material Number to convert to...

I wanted to simply add a column onto the table to show the new material number (just like a vlookup in excel)...

the odd thing is, i've done this loads of times before and tis worked... Anyone able to help?? :confused: :confused: :confused:


SELECT [2005 DATA].*, MatConversion.[WDB Material], MatConversion.[wdb name], MatConversion.Category, MatConversion.Conversion
FROM [2005 DATA] LEFT JOIN MatConversion ON [2005 DATA].Mat = MatConversion.[Celtic material No];

View 1 Replies View Related

Dont Know How To Use Code

Nov 18, 2005

I have a problem that seems like it could be very similar to this post from a few years ago
http://www.access-programmers.co.uk/forums/showthread.php?t=46645&highlight=vba332.dll
My problem is I dont know how to use Access other then open a program. This is for a customer and they dont know how to do it either as someone else devoloped their database.
Basically it looks like the database is corrupt but I can not open it using a newer version of access because it has some permissions and I dont know how to go about making my access "look" like the other computer.
Any help is appreciated
Thanks
James

View 1 Replies View Related

Dont Think Access Can Help, Well Not Sure

Dec 10, 2005

Hi all,

I created a database for my company and it works very well but, I need it or something to track the way I pay comisions. Its a type of multi-level company and pay rates vary. Also, once someone hits the top level they now join in profit sharing. The profit sharing part is the tough part becase say person A is at the top he is a team leader and he gets money not only from his sales, but also from the people in his group below him. It must also be able to pay the correct person if someone quits, say Person D, the system knows that it all off person D's people under him go up to person C now. I hope this isnt to confussing, but im starting to confuss myself as im trying to set this up.

Is access able to keep track of an organization like this or should I try to use something else?

Thanks.

Scott

View 1 Replies View Related

I Dont Know What I Want Is Called

Feb 6, 2007

What I want to do, is have an unbound form, user enters data in to it, then clicks on a 'save' button which then writes the data to a new record within a table

I have got no idea what it is called so find it hard to do the search.

View 14 Replies View Related

I Just Dont Have A Clue Of How To Do It

Jun 19, 2007

Im trying to make a simple database in access , so far all is going well but im stuck with the inventory.
I have "products" table with Id [autonum],name[text],price[money], provider[number], stock[number]
Providers table with Id[autonum] ,name [Text],tel[number],
Employes table with Id[autonum], name[text],tel [number]
and i have Sales table with Id[autonum],date[date],employer[number],product[number],quantity[number],total price[money]

I have relationships between table.provider and provider.name then sales.employer with employer.name and sales.product witht products.name.

Now what i want to do is that every time that i make a sale it modify my stock number on the products table. I think the proper way is just to calculate stock every time i need it but i dont know how to do that either :D
Ill upload my db but i have to tell you that is in spanish so if you haveany question im here to answer.Thanks a lot to all

View 4 Replies View Related

Rounding Up When I Dont Want It To!

Sep 13, 2005

Hello,

I ve performed a query on a table and now have a set of results which is fine for example £1.56, £1.98, £87.90 (ive set the values in to a currency format), now i want to calculate the total so i have run another query on the last and used 'sum' in the 'total' this calculates the value but rounds it to the nearest integer for example 91!

the thing is i have done this many times before and havent had this problem! i cant understand it, its seriously doing my head in. Ive tried allsorts including the 'round' function which doesnt alter it.

any help would be appreciated

thanks

iso

View 1 Replies View Related

Simple But Hard If You Dont Know

Jun 10, 2005

I have created a database in which I have three Fields.
1. Date Joined
2. Renewal Date
3. Member/Renewal

When I type in the date a person joins our club, I have made the renewal date come up displaying a year ahead, when renewal of membershiip is due.

I would like to be able to put in the date joined date and have the field 3 show Member and then when the renewal date is reached, to have in automatically change to Renewal.

It is probaly a simply formula but I can not get it right.

Please Help.

Foxy

View 6 Replies View Related

Access 97 Dont Works

Aug 16, 2005

I have installed on my PC, WindowsXP sp.1, MSaccess versions 97 and XP.
After I have tested some databases, MSaccess 97 don't works successfully more, but XP version works good. I can't modify files mdb. Access works like in run-time mode: bars and commands reduced, standard icon of access absent, database window absent, ecc.
If macro autoexec or a form that play at the start of mdb are present, mdb works but it is impossibile to modify it. Otherwise mdb dont works, I can see access window with only menu files and window.

I have removed access and after yet installed it, but it don't work successfully.

maybe other application leaved files (or modification in file registry) that install procedure of access97 cant rewrite? And that dispose access 97 to work in run-time mode (or like)?

I am hopeless. Can You help me? Can you give me a list of files to remove, or list of modification to do in registry?

Danit :

View 4 Replies View Related

Dont Delete A Record

Aug 17, 2006

Hi guys,

Could anyone give me a solution to protect a table and all the records in there so they can never be deleted when being viewed.

Many thanks, Ben

View 3 Replies View Related

Forms Dont Work

Mar 9, 2006

please can some1 help??
i created a form using wizard to display the information in three tables but wen the form is in form view theres nothing displayed yet in design view all the information is present. please please some1 help:(

View 1 Replies View Related

Test! I Dont Have Access And Need Help Bad Plz.

Oct 30, 2004

1.) What is the File Extension associated with Microsoft Access database files?.........MAF or MAD

2.) A Field Name may contain a maximum of ________ characters.

3.) A ____________________ determines the kind of values that users can store in a field.

4.) A Field Description is required for all data fields......T/F

5.) Use of Field Descriptions dramatically increases the size of the database and, in general, should be avoided.....T/F

6.) FirstName, PhoneNumber, and ZipCode are fields which typically include an Input Mask.......T/F

7.) A Field Name is required, but a Field Caption is optional.....T/F

8.) A 5 digit Zip Code should use this Data Type......

9.) An INDEX speeds up updates, but may slow searches and sorting on a field.......T/F

10.) A Default Value is a value that is automatically entered in a field for new records......T/F

View 5 Replies View Related

Queries :: DSum - Update A Field In Specific Table With Info Form Another Table

Aug 5, 2014

I have a table products with a field "id_product" and "total" (Total items in stock)

I have a query with the fields "id_product" and also the field "total in stock"

I want an update query to update the field 'total' in table 'products' with infos from that query

For each id-product in table products, replace the field total with the field 'total in stock' from the query

So I want to update a filed in a specific table with infos form another table.

View 2 Replies View Related

Need To Calculate Costs Only If Not Empty,dont Know How

Aug 14, 2007

I have a variable cost that is a calculated field (as in the colum only exists in a query not as a colum in a table) that is variable hours * variable rate....the problem is ppl at my company sometimes dont know how the costs are goign to be broken down so they only put a Variable Cost....

and since they dont know the rate and hours my calculated field returns nothing...

how can i accomplish this, VBA might seem the way to go but i don't know how to use it for Access.....

so basically i need to calcualte the variable cost only if they enter something in var hours and var rate...other wise the var cost should just be what the users type ( so i i guess i have to make Var Costs a column in the table to give users the option of entering it)

View 3 Replies View Related

Inner Outer Right Left It Works But I Dont Know Why

Sep 16, 2005

I have a qry I need for picking the info for sending a series of letters out. I finally got it to work and now Im wondering if there is a better more efficient way. The qry I call to generate my report calls on information from 10 other queries and 7 tables. Some of the other queries are needed for other sub-forms that rely on the data. Is this something I should change? or just be happy it works???
-Dan :D

View 1 Replies View Related

Newbie Dont Known Where To Start My Query

May 28, 2006

Hello, Really hope someone can help me.
I have 2 lots of info in 1 table - nameley customer address & posting address

I need to print a form that always has the posting address on the same side. but in some cases if the postal address is the same as the customer address then it is not filled in. hope this makes sense:

Please Im Really stuck

View 2 Replies View Related

Access Dont Want To Save Query Changes

Sep 15, 2006

I'm trying to save a change made to a sql statement in an access query but everytime I save it and close the database, when i open it up back again, the query returns back to the old unchange sql statement like it never got saved. I checked the user permissions and they are all checked (no restrictions). Any help would be greatly appreaciated.

View 1 Replies View Related

Why Queries Dont Display Certain Records.

Dec 6, 2006

ok.. here is a pickle..my table layout is like so..http://www.londonheathrowcars.com/hoo.jpgthe job table stores the main job details.. every job will be in this tableSOME jobs will have incoming flight details... some wontSOME jobs will have outgoing flight details.. some wontSOME jobs will have incoming AND outgoing flight details.. some wont have anyalso SOME jobs (credit card jobs) will have credit card details.. some wontthis is the general problem i am facing..there are 2 records in my job table..jobref no. 020jobref no. 021jobref no. 020 has incoming flight details.. outgoing flight details.. and credit card details.. which means... the job ref no. 020 is present in all 4 tables..jobref no. 021 has incoming flight details.. it does not have outgoing flight details or credit card details.. which means the job ref no. 021 is present in the job table and the incoming flight table onlyi want to create a form that displays every field in the database..my idea is to make a query using all four tables.. and then the form will display the results..HOWEVER!!!!!!!!the form will only display the job ref no 020.. because job 021 is not present in all the tables...why.. is there a way around this.. cant it just display both records and if job 020 does not have card details.. just leave those fields blank.. then on this form.. if i happen to add card details to job 021.. it will just create the record in the card table using the same ref no..is that clear.. someone please enlighten me

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved