I seem to have run into the same problems as RayA McCain but I've managed to solve the error messages & have a new problem. The 2 issues that I found where: 1) there was no end if at the end of the nested elseif block 2) the video cut out the " & after the AND in the ReceivedPOs if statement. It should look like: wherestr = wherestr & " AND " & wherestr = wherestr & "POReceived= true"
Now for my current problem: When I select the openpos or receivedpos checkboxes the list box doesn't get filtered. Both it & the PODetail subform are blank. I've slightly altered the VBA code for my design purposes but the basis is the same.
Private Sub BuildPOList()
Dim s As String Dim wherestr As String
s = "SELECT PurchaseOrderID, VendorName, PODate FROM PurchaseOrderQ" wherestr = ""
If OpenPOs = True Then wherestr = "IsOpen = True" OpenPOLabel.Caption = "Open PO's" ElseIf OpenPOs = False Then wherestr = "IsOpen = False" OpenPOLabel.Caption = "Closed PO's" End If
If ReceivedPOs = True Then If wherestr <> "" Then wherestr = wherestr & " AND " & wherestr = wherestr & "POReceived= true" ReceivedPOLabel.Caption = "Received PO's" End If ElseIf ReceivedPOs = False Then If wherestr <> "" Then wherestr = wherestr & " AND " & wherestr = wherestr & "POReceived= false" ReceivedPOLabel.Caption = "Unreceived PO's" End If End If
If wherestr <> "" Then s = s & " WHERE " & wherestr End If
s = s & " ORDER BY PODate"
POList.RowSource = s POList = POList.ItemData(0) PODetailUpdate
If OpenPOs = True Then PurchaseOrderDetailF.Locked = False Else PurchaseOrderDetailF.Locked = True End If
End Sub
Any help would be much appreciated. I'm loving these inventory management classes! Thanks
Reply from Alex Hedley:
I'd need to check into this as it's been a few years since I've watch this.
One thing to check might be PODetailUpdate
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Microsoft Access 328.