Text Box That Totals Line Items

Jan 25, 2008

I have a database that prints out a contract of line items (as a report) for the home remodeling business.

I use a query to limit the line items which show the description and cost as a subreport.

The only way I could create a total of these line items was to enter an unbound text control, and put in the formula =sum([cost]) where cost being the field name. It works fine, but I need to but the result in a currency format - - two decimals and a $ sign. I sure would like it to do it at the query level, instead of at the report level (will make it more user friendly)

Any suggestions?

View Replies


ADVERTISEMENT

Forms :: How To Get Values From Line Items Form Inserted Into QUOTE LINE

Jun 5, 2014

I have a main form with 3 sub forms. The main form is tied to a table called QUOTES_MASTER. The first sub form is tied to a table called QUOTE_ LINE_ ITEMS_DIRTGLUE. It calculates the subtotal when selecting items. The relationship is one-to-many linked on QUOTE_ID.

The second sub form adds up total of all line items and is not tied to a table.The third sub form adds ESTIMATED FREIGHT to the PRODUCT TOTAL and is not tied to a table. how to get the values from the line items form inserted into the QUOTE_LINE_ITEMS_DIRTGLUE table as they are added.

I also want to insert the total value from ESTIMATED DELIVERED into the LINE_TOTALS field in the table QUOTES_MASTER.I tried this code on the product total sub form but it doesn't do anything and there are no errors:

Private Sub PROD_SUB_AfterUpdate()
DoCmd.RunSQL "UPDATE QUOTE_LINE_ITEMS_DIRTGLUE SET QUOTE_LINE_ITEMS_DIRTGLUE.SUBTOTAL = Me.PROD_SUB WHERE QUOTES_MASTER.QUOTE_ID = " & Me.QUOTE_ID

View 6 Replies View Related

Modules & VBA :: How To Import Text File Line By Line

Nov 18, 2014

I am having a little difficulty with my importing in Access. Every time I import my text file, the lines will be jumbled. I have been reading up and I found this recordset code that seems to be what I need:

Code:
Dim strLine As String
Dim intLineNum As Integer
Dim MyDB As DAO.Database
Dim rst As DAO.Recordset
Open "C:TestTest.txt" For Input As #1
Set MyDB = CurrentDb
Set rst = MyDB.OpenRecordset("tblResults", dbOpenDynaset)
CurrentDb.Execute "DELETE * FROM tblResults", dbFailOnError 'Clear tblResults

[code]....

Basically, this code will extract data from the text file as long as it fulfills the Mid$ criteria. Here's where my problem comes. Each line in my text file is of different lengths and I have to capture the entire line.

I think using the Left$ function would work, but I don't know how to determine the character count such that the entire line of text would be inserted into the table.

Another difference between what I need and the code above is that, I am required to store each line into each row of my table, meaning

Line 1 is placed in Row 1 Column 1
Line 2 is placed in Row 2 Column 1
Line 3 is placed in Row 3 Column 1
.
.
.
Line X is placed in Row X Column 1.

View 14 Replies View Related

General :: Count Line Items

Mar 12, 2015

I have a query that I would like to put a count into but I don't know how

1. count how many line items there are in the query
2 count how many line items there are where the "days late" are

View 1 Replies View Related

Reports :: Report Items Filling A Line Then Next

Oct 17, 2013

using Access 2000.I have a table with fields (image, info1, info2, info3).I want to produce a report where 15 records are displayed in a table like manner. each table cell contain the whole record and the table is 5 rows by 3 columns.

View 4 Replies View Related

Forms :: Ordering 10 Line Items At A Time

May 22, 2014

How to generate prescription order form, so that I can order 10 line items at a time. I have the following tables,

Suppliers
---------
SupplierID
SupplierName
SupplierContact
SupplierAccount No
SupplierPhone No

Order Form Header
-----------------
SupplierID
SupplierName
SupplierContact
SupplierAccount No
SupplierPhone No
Date

Order Items
-----------
OrderID
ItemID
Item Name
Item Description
Item Size
Item Code
Item Qty

Items
-----
ItemID
Item Name
Item Description
Item Size
Item Code
Item Qty

View 2 Replies View Related

General :: Count Number Of Line Items For Material

Apr 27, 2014

I have a form that could have duplicate material descriptions , is it possible to have on that form a field that counts the number of line items for that material and when the material changes the new number will appear .

View 7 Replies View Related

Forms :: Sum Line Items From Subform On Main Form

Jul 28, 2013

I have an Orders form (frm-Orders) that includes a subform (frm-Order Details Subform). The subform has line item totals.I want to be able to sum the line item totals and show the result on the main form, but I can't get it to work. Seems like it should be an easy thing to do.

Someone suggested I try this but it didn't work:

In the footer of the subform I created this expression - =SUM([Line Item Total].

Then in the main form I created a textbox with this -- =[Forms]![frm.Orders].[Form]![frm-Order Details Subform].[Form]![txtSum].

View 11 Replies View Related

Queries :: Average Price Of Last 5 Line By Items By Recent Date

Mar 4, 2015

Any way to filter the average price of of a Product within the last 5 occurences (Line Items). It would pull a week back so WHERE: Between Now()-7 and Now(). Example:

Code:
PARTID | Price | Date
--------------+-------------+---------
111223344 | 5 | 3/1/2015
111223344 | 7 | 3/2/2015
111223344 | 8 | 3/4/2015
111223344 | 10 | 11/22/2014
111223344 | 20 | 10/1/2014
111223355 | 5 | 2/5/2015
111223355 | 6 | 2/1/2015

to:

What I want:

Code:
PARTID | avgPrice | MinDate
--------------+----------------+-------------
111223344 | 10 | 10/1/2014
111223355 | 5.5 | 2/1/2015

View 4 Replies View Related

Queries :: Totals In Queries - Count Similar Items

Jan 14, 2014

Using Access 2010. Have been using a simple query to count similar items. All of a sudden I cannot get the sum of the count. I don't know if I have done something wrong or my program won't work correctly.

The DB is attached. The only query shown is an example of what I want to total, but I cannot get any total.

View 7 Replies View Related

Totals Query In Text Box

Aug 26, 2004

I am having problems with query results appearing in a text box. The query is filtered by two combo boxes on my form. The query works fine and gives me the correct results when I run it by itself and enter the required info.

These are the two control sources I have used for the text box (without the quotes, of course):
"=qtotRecords!CountOfLast_Name" and "[qtotRecords]![CountOfLast_Name]"

Maybe including my query will help. The two control boxes on my form are cboSchool_Name and cboSeminar. This is my query:

SELECT Count(tblMain.Last_Name) AS CountOfLast_Name
FROM tblMain
WHERE (((tblMain.School_Name)=[Forms]![frmAdd]![cboSchool_Name]) AND ((tblMain.Seminar)=[Forms]![frmAdd]![cboSeminar]));

All I get in the text box is #Name?

Thank you in advance for any assistance.


Best regards,
MrAviator

View 4 Replies View Related

Line Feeds In Text Box

Oct 23, 2004

According to the books and examples I should get multiple lines of text in my text box with...

messageBody = "Line one stuff" & Chr(10) & "next line stuff"
Forms!NotifyEmails!Text2 = messageBody

...but instead I get funny symbols where the line feed should be. But it works sending it to email.

Anyone shed any light on this behaviour?

View 2 Replies View Related

Line Break In Text Box

Jul 27, 2011

how to populate a textbox with a line break?

=[Forms]![Violations]![cboSection4] & i want the line break here & [Forms]![Violations]![cboSection5]

View 8 Replies View Related

Last Line Of Text From A Memo Field

Nov 21, 2006

Can anyone help....

I have a field on an Access db, this is a "Memo " type field which has many lines of text within it.

I need to run a query on this to get the last line of text within this field.

Aside from records where this memo field is filled in I also have records where the memo field is blank. So basically if the memo field is blank I want a blank field returned as well as fields with data.

I am using Access 2003 but also am running this on Access 2000 (not sure if there has been a change to function names)

This is seriously bugging me - can anyone put me out of my misery?

View 5 Replies View Related

Append New Line To Text File

Oct 25, 2005

I want to open a txt file through my access database and append a line to it. When I use the opentextfile method for appending but it always appends my new text line to the end of the last line. I want it to append the new text to a new line. I have tried object.skipline but this is not supported when appending?

This is what I get:
"oldline" "newline"

but I want:
"oldline"
"newline"

Here is my code

sub ConcatenateTxtFile ()

Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fd.OpenTextFile(dpath, ForAppending)
'Need a line here to skip to next line
f.writeline ("newline")

End Sub

View 1 Replies View Related

Line Break In Rich Text Box

Aug 12, 2011

how to make a line break in a rich textbox in access 2007? Chr(13) & Chr(10) worked until I changed the textbox to rich, which is necessary because certain words in the textbox need to be bold.

View 2 Replies View Related

Multi-line Scrollable Text Boxes??

Jun 27, 2005

Hi All,

I'm a noobie with Access, and on my form which displays Account information, I also want to display the multiple Addresses this account can have. I can't find any type of scrollable text box (something to look like a spreadsheet), and I know it's not a list box I need to use.

How do I create this and what is it called? I tried using a data grid but I dont think that is it either :confused:

Also, my scrolling text icon on the toolbox is greyed out, not sure why.

Please help!

Thanks,

Mike

View 6 Replies View Related

Modules & VBA :: Set Focus Exactly In Second Line In Text Field?

Jul 23, 2013

how to set focus in first or last line, but I need set to second.

View 11 Replies View Related

Reports :: Dynamically Resize Text Box And Keep Them In Line

Apr 15, 2014

I am creating a database and need to produce a report that will form an itemised quotation.There can be up to 8 items on the quotation along with their associated costs to the customer. I am trying to make the "item" field dynamically expand if necessary when longer text is entered into it and then expand the corresponding "Totals" fields to match the new size.I have tried using the "Can Grow" property however for some reason the formatting does not cascade down to the fields below and the "Totals" fields remain the same size.

To try and explain better I have included a screen shot of the relevant part of the report and how it looks when printed. I should point out that the "QuotesQuote" box at the top of the screen is set to "Can Grow" and when that expands the boxes below automatically move to accommodate this.

View 2 Replies View Related

General :: Put Line Break In Text Box From Keyboard?

Oct 17, 2014

Is there an equivalent to Alt-Enter in excel to put a line break in a text box from the keyboard?

View 2 Replies View Related

Modules & VBA :: Text Box Automatically Scroll Down To Last Line

May 24, 2015

I have a textbox on continues form which contains multiple lines and I d like to set it up so it ll be scrolled down completely when it displays the form. I ve already found a few so called solutions but nothing worked for me.

View 5 Replies View Related

Queries :: How To Add A Text Line To A Query Field

May 18, 2013

I have a combo box that gathers data based on a query. Is it possible to add a line of text to be displaed every time i pull down the box?

For example I have:

Data1
Data2
Data3

I would like to have:

Not In List (the added txt)
Data1
Data2
Data3

View 2 Replies View Related

Modules & VBA :: Writing To Text File With Line Feeds

Jun 22, 2015

I have a function which takes a recordset and writes the contents to a text file. One of the fields in the recordset is a free format text field, the contents of which originate from a text box on a form. Occasionally, a user can hit the 'Enter' key to add a new line (carriage return) to the note within the text box.

The problem is, when the output text file is subsequently imported to Excel, the carriage returns within that text field serve to move the next piece of data to the next row (even though the CR is within the double-quote text-qualifier in the text file)I want line breaks within the text field to be retained within the cell.

One option would very simply be to replace the carriage returns with simple spaces in the write function. I could do that quite easily. However, I would prefer to retain whatever the user has entered into the text box, including line breaks, if at all possible?So if the user broke his free format 'note' into multiple lines (for whatever reason), it would similarly appear as multiple lines in the same cell (and in the same row / record) in the Excel worksheet.

I could replace the carriage return with some obscure character during the write, then switch it back during the Excel import, but that seems a little clunky (plus Murphy's Law dictates that no matter how obscure a character I choose, somebody, at some point, will genuinely use it, and it will get switched out. Which means I'd have to use a non-printing character?could I simply replace the carriage return with a line feed? (Or is it the other way around? I always get carriage returns and line feeds mixed up!)there's a simple way around this but I always get confused as to precisely which ASCII character the 'Enter' key produces when keying into a text box.

View 14 Replies View Related

Text Color For Urgent Or Important Items

Jul 2, 2012

How do I set the text color in one field as Black for regular records & a different color for Special records?

View 1 Replies View Related

Reports :: Insert Half-line Feed Into Text In A Control

May 5, 2014

Any way to insert a half-line feed into text in a control?

View 2 Replies View Related

Using Multi-Line Text Box To Pull Specific Records To A Report

Oct 23, 2014

I'm trying to have users enter multiple IDs from a table into a text box separated by newline chars, and then (once they press a button) have some sort of macro or code read each line and pull a report I've created based on the ID. Is that possible?

Example:

Table
ID
DataPoint1
DataPoint 2
DataPoint 3

1
d1
d4
d7

2
d2
d5
d8

3
d3
d6
d9

Text Box (User will enter values and hit OK)
2
3

Report

ID: 2
DataPoint 1: d2
DataPoint 2: d5
DataPoint 3: d8
-------Page Break------------
ID: 3
DataPoint 1: d3
DataPoint 2: d6
DataPoint 3: d9

View 2 Replies View Related







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