I have a query that calculates Total Costs as (total fixed + total variable). total fixed is ( fixed hours * fixed rate) and total variable is (var hours * var rate) as expected....
But one of my records only has Var hours and a Var rate,therefore calculates total variable fine, but since this certain product doesnt have any fixed cost my TOTAL COSTS record for that product is left BLANK??
If there is no fixed cost than the total cost should just equal total variable....
When you enter a fixed cost and rate it works as expected though...any idead please i am on a deadline, im pretty sure VBA is the easiest way to go but i dont know how to go about it, this query is the heart of the whole Application, it is used primarily as the source for a few reports so this throws off my totals.
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)
I have set up a query for an invoice to work out the sum of the field etc, but another one of the criteria is to search between 2 dates, how can i have the dates set as variables which i already have managed but be able to make the sum of the prices just be set between these variable dates?
I'm setting up a delivery cost and location form. What i need this form to do is say i select Guildford for delivery i need the delivery cost text box below to say £12.50 without manually looking up the costs for that area and if it was Farnham then £24.00. What is the easiest way of doing it?
I need to audit the freight bills charged by freight company which has over 20,000 consignment per week. The basic charge is base on distance and weight, something like this: SYD-MEL <1kg $6 SYD-MEL<3kg $6.7 SYD-MEL<5kg $7 SYD-MEL<10kg$10 SYD-MEL>=10kg $12, $4 per kg rate SYD-PER<1kg $10 .....
Based on the freight rate, how can I use Access to calculate the freight charge for each of the consignment ? Is there anyway to build some query or something to retrieve the freight rate and calculate the freight cost of each consignment?
I am trying to create a query that has a self referencing running total based on the values (point totals) of itself (running total of values in the running total column that have already been calculated for all previous records) plus the total of new points being added in the current record, less the total of points being removed in the current record. This running total can never go below 0, if it does, the running total should restart at zero and add in only new points and begin the process again with the next records
I am able to do this in Excel in less than two seconds so I know there has to be a way to port this into a query. I've attached an excel example of what I am exactly trying to do
If it takes multiple queries to complete the required output I am ok with it. In my previous outtakes I have had up to 8 queries but just couldn't seem to do it..
1) I am pretty newbie to this access programming, do forgive me if my questions sounds stupid.
2) Basically I create an application in access capturing or production information for my company. now the top management suddenly wanted whats their main concern:- Total Daily/Monthly, Quarterly, Annual Sales (By Model If possible)
3) I start with daily (Lets don't be too overly ambitious).
4) I try to let user select dates from my calender control and reflect daily sales (in Total & By Model break down) insert into my form.
5) Understand someone told me from my previous post in Calender control I can achieve it either through forms or queries, which is a better way. (in terms of flexibility to change for program maintenance/ scalibility) wise ?
Hello World:I have two tables, one called Assets and the other table called Job Sites. the Assets table has several fieldsAssetID - autonumberplus othersthe Job Sites table has two fieldsJobSiteID - autonumberJobSite - text (with about 22 names in it)the I add the JobSite to the Assets table (hiding the JobSiteID) it shows me the expected drop down box but it is BLANK. If I click on any of the BLANK spaces in the drop down, it populates the field. It is behaving as if the font color was white.Any ideas??? I am baffled. :confused: :confused:
I have just created a query so that I may base my report on it. The query ties together 4 tables. I only included the fields that will be in my report. I created the report using the wizard and used my new query as the source but it does not want to work. I tried opening the query and it was empty even though I have entries in the database.
I'm trying something quite simple, adding dates into a table with the aid of an action SQL statement (INsert Into) in VBA.
However, if a date is empty, the value 12:00:00 AM is filled in! I really want that if it a date is set to empty, that noting is added to the table... I can use an if statement though, to fix it, but why does it fill in 12:00:00 AM if a date is empty?? Can you fix it? Or is there no other way?
I have a query that appends records to a table with a constant numer of fields. so sometimes I have fields with no data. is there any way to create query which selects only fields with data.
I am trying to make a query with two tables. Each row consist of a student ID, their name and all their personal information. Both tables are exactly the same. But one table is a link table. That link table gets update every so often from an outside program and the other table is not linked. I want to be able to run a query that updates certain fields called "address changes". I have figured out how to find the updates, but I am having a problem with a field that is blank. If I have a field in the non-linked table that is empty but there is information in the linked table, it does not see it. Is there a way to get around this empty field problem?
I have been going back in a db to the beginning of time and restructuring...I have a field sales person if its null I need to assign a value of 100 to another field representativeid, I have been using the update query to accomplish the update until now. I've tried is null and "" to get this query to update, any idea?
I have an Input form that does not clear the fields after I hit the Save button. Data Entry is set to YES. If I use the navigation bar, there is no problem, but I would like to have the fields empty after hitting the Save Button, so that the navigation bar can be removed. What is wrong?
Hi guys, here is my new problem.I have a form which conatins a subform that shows info from a query.I created a query which shows records from table history when the field comment is like *code 1.the criteria in the query, in the comment field is: [forms]![edititem]![vconcate]In the edititem form i have a hidden field called vconcate which receives the value as follows:me.vconcate= "*code " & me.winecode (me.winecode is integer)after assigning the value to vconcate i display the vconcate value and shows*code 1, as it should be. However, the subform doesnt displays any record.I also tryed to insert the query in the editform, but nothing.if i run the query from the query window, and fill the value as *code 1, it works.here is more info:when the edititem is open, the user has to select a wine code from a combo box. After this selection the values are assigned to me.winecode and the me.vconcate. Because when i open the form edititem these codes are null or empty the subform is empty. Is there any way to refresh the subform via code?any suggestion?
Hey guys......simple problem I have a form with 3 combo boxes.
The 1st combo, called winecode, gets the values from the following sql: SELECT [winecode] FROM wine WHERE winedesable=0; it works.....
The second combo box, called suppname, gets the values from another select, but depending on the previous combo: SELECT DISTINCT [supplier].[suppname] FROM supplier, suppwine WHERE [supplier].[suppnumber]=[suppwine].[suppnumber] And [suppwine].[winecode]=[Forms]![addpop]![winecode]; it works......
The 3 rd combo, called winesubcat, gets the values from a query which takes the selected value from the previous 2 combos. The query works by it self . However, i added the query in the data tab and open the form. then i selected values from the first 2 combos and there is no value in the 3rd combo...... any idea??
When I click a button I have code (below) that checks to see if my Combo boxes are NULL (empty), and if they are it’ll prompt the user to “fill in all fields”. Right now it includes all of the combo boxes on my form. Although, I want it to only include 3 combo boxes (I have 5 on my form). How could I do this, lets say if my combo box names are cbo1, cbo2, cbo3 ?
For Each ctl In Me.Controls Select Case ctl.ControlType Case acComboBox If ctl.Value & "" = "" Then MsgBox "You must fill in all data fields." Exit Sub End If End Select Next
In a previous post someone mentioned a difference between Null and Empty. Is Null is not pulling the nulls but I know those fields are empty. Can someone tell me how to pull in these empty fields. for my calculation I need to get Companies that showed revenue after and didn't show revenue once their contract started.
Code:DoCmd.RunSQL "SELECT tblTrades.tradeID, tblTrades.TradeConfirm, tblTrades.Laurent FROM tblTrades WHERE (((tblTrades.TradeConfirm)=No) AND ((tblTrades.Laurent)=Yes));"
I can seem to find a way to test if the SQL for my record set returns value. I've tried using the if statement with .BOF and .EOF. When there are no records returned for the criteria, there should be a way to test it with IF. I can't seem to figure it out. Using the record count does not work because it also returns at least one record. Help.
Here is the code
Dim rsContacts As ADODB.Recordset
Set rsContacts = New ADODB.Recordset
SQLStr = "SELECT FormatPercent(((43200-Sum(DateDiff('n',[tblOutageDetail.StartTime],[tblOutageDetail.endtime])))/43200),2) AS ElapsedTime FROM (qryOutageTotalMin INNER JOIN tblOutageData ON qryOutageTotalMin.Outage = tblOutageData.Outage) INNER JOIN tblOutageDetail ON tblOutageData.Outage = tblOutageDetail.Outage WHERE (((tblOutageData.System)='PARK PRIMARY') AND ((tblOutageDetail.StartTime)>=Date()-30) AND ((tblOutageDetail.OtgCat)=1))"
I am trying to make a query with two tables. Each row consist of a student ID, their name and all their personal information. Both tables are exactly the same. But one table is a link table. That link table gets update every so often from an outside program and the other table is not linked. I want to be able to run a query that updates certain fields called "address changes". I have figured out how to find the updates, but I am having a problem with a field that is blank. If I have a field in the non-linked table that is empty but there is information in the linked table, it does not see it. Is there a way to get around this empty field problem?
I have a report base on a select query but in the report i get the following:
page 1 = record 1 page 2, page 3, page 4 = are empty (nothing to see on the pages) page 5 = record 2 page 6, page 7, page 8 = are empty (nothing to see on the pages) page 9 = record 3 ...........etc... So there are three empty pages between every two pages(records).
I have checked in the settings of the report and all properties but cannot find the solution.
Can any one help me to solve this ? Thanks in advance
This is working fine as long as I input the values for all the fields...when some values are missing, I get the error that Access can't append the query due to validation rule violations...got no clue what to do !
Using expression builder what expression do I use to not display the filed in my query if the field is formatted as currency and is blank (showing £00.00)