advanced forms create query that looks like the following. call it qryfindcustomer

15
Advanced Forms Create query that looks like the following. Call it qryFindCustomer

Upload: lucia

Post on 24-Jan-2016

23 views

Category:

Documents


0 download

DESCRIPTION

Advanced Forms Create query that looks like the following. Call it qryFindCustomer. Advanced Forms Create a form based on the query you have just created and add a button to it like this. Call it frmFindCustomer. btnSelect. Advanced Forms - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Advanced Forms Create query that looks like the following. Call it  qryFindCustomer

Advanced Forms

Create query that looks like the following. Call it qryFindCustomer

Page 2: Advanced Forms Create query that looks like the following. Call it  qryFindCustomer

Advanced Forms

Create a form based on the query you have just created and add a button to it like this. Call it frmFindCustomer

btnSelect

Page 3: Advanced Forms Create query that looks like the following. Call it  qryFindCustomer

Advanced Forms

Create a form as shown below – call it frmTakeOrder

TabControl

btnFindtxtSurname

txtFirstName

Subform – frmFindCustomer

pagChooseCustomer & pagChooseItems

Page 4: Advanced Forms Create query that looks like the following. Call it  qryFindCustomer

Advanced Forms

Add the following as criteria to the query qryFindCustomer

Page 5: Advanced Forms Create query that looks like the following. Call it  qryFindCustomer

Advanced Forms

Add the following code as an event for the button btnFind

Private Sub btnFind_Click()

[frmFindCustomer].Requery

End Sub

Page 6: Advanced Forms Create query that looks like the following. Call it  qryFindCustomer

Advanced Forms

Create the following table - tblTemporaryItems

Note the Default value for “Medium”

Page 7: Advanced Forms Create query that looks like the following. Call it  qryFindCustomer

Advanced Forms

Create a new form called frmTemporaryItems.Make the form default view – Continuous FormsMake the record source for the form tblTemporaryItems

Page 8: Advanced Forms Create query that looks like the following. Call it  qryFindCustomer

Advanced Forms

Create a new form called frmTemporaryItems.Make the form default view – Continuous FormsMake the record source for the form tblTemporaryItemsAdd the head and footer.

Page 9: Advanced Forms Create query that looks like the following. Call it  qryFindCustomer

Advanced Forms

Add a combo box - cmbDescription

Page 10: Advanced Forms Create query that looks like the following. Call it  qryFindCustomer

Advanced Forms

Add a combo box

Page 11: Advanced Forms Create query that looks like the following. Call it  qryFindCustomer

Advanced Forms

Add the following values to the data tab in the combo box object.

Control Source – DescriptionBound Column - 2

Page 12: Advanced Forms Create query that looks like the following. Call it  qryFindCustomer

Advanced Forms

Add three more input boxes and bind them to Medium, Price and Qty respectively on their Control Source (Data tab)

Page 13: Advanced Forms Create query that looks like the following. Call it  qryFindCustomer

Advanced Forms

Add the following code as an update event for the combo box. This will update the table with the rest of the data.

Private Sub cmbDesciption_Click()

Me.txtMedium = Me.cmbDesciption.Column(2)Me.txtPrice = Me.cmbDesciption.Column(3)Me.txtQty = CInt(InputBox("Enter in Quantity", "Quantity", 1))DoCmd.RunCommand acCmdSaveRecord

End Sub

Page 14: Advanced Forms Create query that looks like the following. Call it  qryFindCustomer

Advanced Forms

Add another inputbox (txtTotal) make the format currency and put the following as the control source =[Price]*[Qty]

Page 15: Advanced Forms Create query that looks like the following. Call it  qryFindCustomer

Advanced Forms

In the footer – add another textbox (txtGrandTotal) and make the format currency. Add the following formula into the Data Source =sum([Price]*[Qty])