473,756 Members | 7,560 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to create a quote not an order

I have several tables in my database. I use these to create 'quotations'
that show product code, description, selling price and quantity required.
Users can enter as many lines as possible and a running $ total is updated
after each line is updated. At the end of the 'quote' I simply want to press
a button, clear the inputted data and restart a new 'quotation'. Any help
would be appreciated.

I just don't know what code to put against such a control button.

Regards

Upsy
Nov 12 '05 #1
4 4153
Peeter Ups wrote:
I have several tables in my database. I use these to create 'quotations'
that show product code, description, selling price and quantity required.
Users can enter as many lines as possible and a running $ total is updated
after each line is updated. At the end of the 'quote' I simply want to press
a button, clear the inputted data and restart a new 'quotation'. Any help
would be appreciated.

I just don't know what code to put against such a control button.

Regards

Upsy


I would create a continous form. Your layout may be very similar to a datasheet
(Tabular). You can do this via the FormDesigner wizard. Once built, get into
design mode of the form. In the footer, create a text box and drag it under the
price field.

Let's say the price field is called Price. In the footer textbox, get the
property sheet open and in the ControlSource in the Data tab enter
=Sum([Price])
If Price is a calculated field you might have to change it
=Sum([ItemPrice] * [ItemQty])
to acheive the extended price.

Each time you enter a value, the tot price in the footer shold change.

As far as a command button....you are a little hazy about what you want to occur
so....create a query to delete the records in the quotes table and in the query
you can do something like
Docmd.SetWarnin gs False
Docmd.OpenQuery "YourDeleteQuer y"
Docmd.SetWarnin gs True
and put this code in the command button OnClick event.

If you want to save them....My recommendations is you understand what a form and
subform is. IOW, you would have a a table called Quotes and another called
QUoteItems. Build a form/subform. When you switch to a new quote, if a new
quote all items are blank else the existing items are displayed.
Nov 12 '05 #2
"Peeter Ups" <up**@austarnet .com.au> wrote in message news:<bu******* ***@austar-news.austar.net .au>...
I have several tables in my database. I use these to create 'quotations'
that show product code, description, selling price and quantity required.
Users can enter as many lines as possible and a running $ total is updated
after each line is updated. At the end of the 'quote' I simply want to press
a button, clear the inputted data and restart a new 'quotation'. Any help
would be appreciated.

I just don't know what code to put against such a control button.

Regards

Upsy


Trevor Best could probably answer this better than I, but anyway, here
goes... Just set a flag in your "Invoice" table, which indicates
whether this is a quote or a sale. Then you would just filter for
'quote'/'sale' to get totals for each. No need for another table. If
you don't want to keep the data at all for a quote, you could just
delete the records... I'm not sure a Form.Undo would do it...
Nov 12 '05 #3
Thanx guys - much appreciated ..... BUT .....

1) Yes Pieter, I DO NOTwant to keep the records at all. I just want to see a
total $ figure, give the guy on the end of the phone that $ figure, hang up
from him and wait for another prospective customer to ring. I would then hit
the 'New Quotation' button and 'delete' (thanx Salad - that works
beautifully) the quoted lines and start with a new quotation with a blank
screen.

2) When I run the delete SQL it asks if I want to delete the records. Is
there a option to ignore this question and to just do the deletion?

3) After it has done the deletion it does not clear the screen of the
entered lines. How do I clear the screen?

4) When I go to enter new lines the screen shows '#Deleted' in several
fields for each of the lines entered in the previous quote. How do I get rid
of these? I just want a blank screen like when I first entered the form.

Thanx guys.

"Salad" <oi*@vinegar.co m> wrote in message
news:40******** *******@vinegar .com...
Peeter Ups wrote:
I have several tables in my database. I use these to create 'quotations'
that show product code, description, selling price and quantity required. Users can enter as many lines as possible and a running $ total is updated after each line is updated. At the end of the 'quote' I simply want to press a button, clear the inputted data and restart a new 'quotation'. Any help would be appreciated.

I just don't know what code to put against such a control button.

Regards

Upsy
I would create a continous form. Your layout may be very similar to a

datasheet (Tabular). You can do this via the FormDesigner wizard. Once built, get into design mode of the form. In the footer, create a text box and drag it under the price field.

Let's say the price field is called Price. In the footer textbox, get the
property sheet open and in the ControlSource in the Data tab enter
=Sum([Price])
If Price is a calculated field you might have to change it
=Sum([ItemPrice] * [ItemQty])
to acheive the extended price.

Each time you enter a value, the tot price in the footer shold change.

As far as a command button....you are a little hazy about what you want to occur so....create a query to delete the records in the quotes table and in the query you can do something like
Docmd.SetWarnin gs False
Docmd.OpenQuery "YourDeleteQuer y"
Docmd.SetWarnin gs True
and put this code in the command button OnClick event.

If you want to save them....My recommendations is you understand what a form and subform is. IOW, you would have a a table called Quotes and another called QUoteItems. Build a form/subform. When you switch to a new quote, if a new quote all items are blank else the existing items are displayed.

Nov 12 '05 #4
"Peeter Ups" <up**@austarnet .com.au> wrote in message news:<bu******* ***@austar-news.austar.net .au>...
Thanx guys - much appreciated ..... BUT .....

1) Yes Pieter, I DO NOTwant to keep the records at all. I just want to see a
total $ figure, give the guy on the end of the phone that $ figure, hang up
from him and wait for another prospective customer to ring. I would then hit
the 'New Quotation' button and 'delete' (thanx Salad - that works
beautifully) the quoted lines and start with a new quotation with a blank
screen.
One idea...
you could base a form/subform on Quotes/QuoteItems and then if the
customer accepts the quote, append the records from Quotes and
QuoteItems to the Invoices/InvoiceItems tables. After that, you could
do something like:

dim db As DAO.Database
Set db=CurrentDB

DoCmd.SetWarnin gs False
'append parent Invoice record to real invoice table

db.Execute "INSERT INTO Invoices ( CustomerID, FirstName, LastName,
Address, City, State, ZipCode, PhoneNo, MapscoPage ) IN
'F:\SaveUs\Comc ast2.mdb'
SELECT Customer.Custom erID, Customer.FirstN ame, Customer.LastNa me,
Customer.Addres s, Customer.City, Customer.State, Customer.ZipCod e,
Customer.PhoneN o, Customer.Mapsco Page FROM Quotes;"

'append child records into real invoice details table
db.Execute ""INSERT INTO InvoiceItems( CustomerID, FirstName,
LastName, Address, City, State, ZipCode, PhoneNo, MapscoPage ) IN
'F:\SaveUs\Comc ast2.mdb'
SELECT Customer.Custom erID, Customer.FirstN ame, Customer.LastNa me,
Customer.Addres s, Customer.City, Customer.State, Customer.ZipCod e,
Customer.PhoneN o, Customer.Mapsco Page FROM QuoteItems;"

db.Execute "DELETE * FROM Quotes",dbFailO nError
db.Execute "DELETE * FROM QuoteItems", dbFailOnError
DoCmd SetWarnings True

....

2) When I run the delete SQL it asks if I want to delete the records. Is
there a option to ignore this question and to just do the deletion?
Use DoCmd.SetWarnin gs False to turn off the warning messages
but BE SURE to turn them back on at the end of the code AND in the
error trapping of your procedure.

3) After it has done the deletion it does not clear the screen of the
entered lines. How do I clear the screen?
Me.Requery will force the form's recordsource to be requried, and if
there are no records in the table, you won't get anything in the
form...

4) When I go to enter new lines the screen shows '#Deleted' in several
fields for each of the lines entered in the previous quote. How do I get rid
of these? I just want a blank screen like when I first entered the form.

One or more of the following
Me.Requery
Me.Refresh
Me.Repaint 'repaints the form.
Nov 12 '05 #5

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

Similar topics

4
1277
by: Chris | last post by:
I have the following XML: <?xml version="1.0" encoding="ISO-8859-1" ?> <ORDERS> <ORDER> <ORDER_ID>123</ORDER_ID> <X>a</X> <X>e</X> <X>f</X> </ORDER>
6
8520
by: Rudolf Bargholz | last post by:
Hi , I have the following tables ------------- PAX: Id Order_Id Name Position
1
6288
by: md7546 | last post by:
Hi, first time posting to this group, but I have followed advice and examples for several months, so thank you. I work for a small telecommunications company. I have a simple Orders database that has an Orders table to track a sales order, using OrdersID as the PK. I have a related one-to-many table called OrderDetails, with the OrdersID as a FK, which shows all the products sold with that order. Then I have an Update table, in a...
2
1722
by: ABC | last post by:
Can I create an Interface which have a method have variate type parameters? I want create an Interface named IDataEditable which have two methods: LoadRecord and SaveRecord. As the LoadRecord have variate type parameters based on the record primary key definition such as: The product table should be:
1
1399
by: kkitto | last post by:
HI, I have 6 order book for issuing order numbers to suppliers. Each has 100 unique numbers in it which I need to create in a trackable database to track our outgoing payments against each order number for each supplier. Is there a way to create an order book that automatically creates 100 records with specified unique order numbers? Does anyone know of some existing database similar that I can use as a starter? thanks
2
6592
by: Angel Of Death | last post by:
I have a method. It takes some XML as a parameter. Depending on the content of the XML it should create a specific object and call a KNOWN method. So: public void PersistXml(string XmlData){} I then determine what object I should call the Persist method on using a switch statement (not very OO). switch (otype)
23
7416
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these in an array. The application compiles but aborts without giving me any useful information. What I suspect is happening is infinite recursion. Each Directory object creates an array of Subdirectories each of which has an array of...
6
12473
by: fieldja | last post by:
I have a form called OwnerForm. It contains a combo box called Owner. The combo box looks up names from a table called OwnerName. It contains fields called OwnerID and Owner. I also have a main form called ProjectsForm. This form has several fields to enter data. I have a query that is called Owner Query. This query contains the fields IDNumber.Projects2 Team.Projects2 and Owner.OwnerName getting information from tables. On the...
7
3489
by: Wiebe Tijsma | last post by:
Hi, I'm using C# + webDAV to create a draft message to be sent in a user's Drafts folder. I can create the message successfully, however when I open the message in outlook, it doesn't show the 'send' button, (only 'reply' etc as if it was a received message). I'm using exchange explorer to see the difference in webDAV properties
14
5157
by: Lee | last post by:
I have a xml file, here is sample part: <?xml version="1.0" encoding="UTF-8"?> <ProducsList> <Product id="1"> <SpecList> <Spec> <SpecLabel>Height</SpecLabel> <SpecValue>10</SpecValue> <SpecCat>Dimension</SpecCat> </Spec>
0
9462
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9857
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9722
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8723
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6542
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5155
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3817
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3369
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2677
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.