Parameter prompt when closing form - Access 2010

TimTDP

Registered User.
Local time
Today, 18:08
Joined
Oct 24, 2008
Messages
213
On a pop up form I have a list box. The row source for the list box is
Code:
SELECT tblWebOrder.WebOrderId AS [Web Order No], tblWebOrder.CustomerWebOrderNumber, Format([WebOrderDate],"dd/mm/yyyy") AS [Order Date], tblCustomer.CustomerName AS [Customer Name], tblArea.Area FROM (tblCustomer LEFT JOIN tblArea ON tblCustomer.[PhysicalAreaId] = tblArea.[AreaId]) INNER JOIN tblWebOrder ON tblCustomer.CustomerID = tblWebOrder.CustomerId WHERE (((tblWebOrder.Processed) Like [Forms]![frmSelectWebOrderToOpen]![txtOrderStatus]) AND ((tblWebOrder.WebOrderDate) Between [Forms]![frmSelectWebOrderToOpen]![dteStartDate] And [Forms]![frmSelectWebOrderToOpen]![dteEndDate]+1)) ORDER BY tblWebOrder.WebOrderId DESC;

I have the following "On Click"event on the list box
Code:
Private Sub lstWebOrder_Click()

lngWebOrderId = Me.lstWebOrder.Column(0)

DoCmd.Echo False
DoCmd.Close
DoCmd.Echo True

End Sub

When I click on some of the records on the list box the form closes. On some of the records I get a parameter prompt to enter:
Forms!frmSelectWebOrderToOpen!txtOrderStatus
Forms!frmSelectWebOrderToOpen!dteStartDate
Forms!frmSelectWebOrderToOpen!dteEndDate

I inserted the echo commands to prevent this, but this has not helped!

Why am I getting the prompts?
How do I prevent them?

Many thanks
 
Tim, is the frmSelectWebOrderToOpen - Closed after the Pop up form is opened?

If so make sure the form is not closed until you have done with the Pop up form.. As you can see the RowSource of the listbox requires the Data from the frmSelectWebOrderToOpen.. Which would explain why you get the Parameter Pop ups..
 
frmSelectWebOrderToOpen is open because this is the form on which the list box resides
 
Okay am :confused: , so what is the Pop up form called..
 
The pop up form is called "frmSelectWebOrderToOpen"
 

Users who are viewing this thread

Back
Top Bottom