Top tip spikepl!! Not only did your suggestion work but the code is so much more simple! This is what I ended up with:
Dim a1 As Integer
Dim intanswer As Integer
Dim sql As String
Dim db As DAO.Database
Set db = CurrentDb
a1 = DCount("UnitPriceNew", "tblparts", "UnitPriceNew = 0")
If a1 > 0...
I've written code to update pricing. If some but not all of [UnitPriceNew] fields = 0 then code works. Problem is, if all of the [UnitPriceNew] fields = 0 then the first msgbox is ignored and pricing is updated, which is what I want to avoid at all costs. Please help!
Private Sub...
Hi again!
One last question - when I open a recordset and using your example:
Set source = db.OpenRecordset("SELECT...ORDER BY Field1, Field2")
can I use a query that I've created but change the filter criteria on the fly? I want to use the same query but get 2 different results for 2 different...
Dear Paul,
You are my Saviour!! I can't thank you enough! Simple instructions that worked a treat!!
The Solution:
Dim itemCounter As Integer
Dim dest5 As Recordset
Set dest5 = db.OpenRecordset("qry_CommonServTempl_update", dbOpenDynaset)
itemCounter = 0
servicevariable = dest5![Service]
Do...
Hi there!
I'm writing a recordset to a table (ready for export to SAP) which has 2 sources of data (queries). I need to sort the recordset then add a sequential Item Number.
My 2 problems are, when I sort the recordset, it sorts each source separately - I need them to be sorted together.
My...