Well, in the query DMin requires them all to be grouped.
I've tried this:
lngLoc = Dmin("LocID", "tblLocation", "Nz(DLookup("LocID", "tblLocation", strFind), 0)")")
but it doesn't compile
Ok, I asked the wrong question. I'm using this in a module::
strFind = "[InUse] = 0 And nz([ItemID],0) = 0 and [Parent] = """ & strParent & """ "
lngLoc = Nz(DLookup("LocID", "tblLocation", strFind), 0)
How do I add a group to a where string?
I want to find a record that meets several criteria.
SELECT tblLocation.*, tblLocation.fItemID, tblLocation.InUse, tblLocation.Parent
FROM tblLocation
WHERE (((tblLocation.fItemID) Is Null) AND ((tblLocation.InUse)=False) AND ((tblLocation.Parent)="DR2"));
This query returns 15 available...
OK... over my head here! RepositionForm is called from the form, hence... RepositionForm me.
But I also need to call RepositionForm from within the module where the RepositionForm sub is located. Passing the me name through more than one sub? How does that work?
RepositionForm me works great...
I have a module with a simple routine to position the form to the last record
Public Sub RepositionForm(frm As Form)
10 On Error GoTo RepositionForm_Error
Dim strWhere As String
30 strWhere = "LocID = " & lngLoc
70 frm.Requery
80 With frm.RecordsetClone...
@MajP I think I've read everything in this thread (and others) but I can't find the answer.... I'm adding this itemgenie to my already running file organizer. When you create the union queries in the 3 sort orders (item, location, manual) you have Order By 4, 6, 1 and 4, DESC, 6, 1 etc. What do...
Oh My! This works beautifully. Instead of the field for data type, I changed the field to list the table it originated from and it's perfect! I apologize that my form had no data. I forgot to localize the tables. :cool: Thank you SO much!
I'm using Majp's MultiControl Search to create a search form.
My object is to filter a subform with numerous fields.
1. I have a search box to type in whatever I'm searching for.
2. A listbox with a list of fields to search in... $25 in Amount, Jones in Name, etc.
3. A listbox with the various...
yes, the eval field is what started this whole thing. I used it and it worked, (after a lot of help from here) but it wasn't pretty like this calculator.
One instance.... break a receipt apart into different categories and split the sales tax between them; light bulbs for the house, groceries for the hungry, a gadget for the ...
Who owes me for this bill?... 30% is Bill; 10% is Jane; the rest is mine.
That one doesn't put your number where you want it either. In data entry,
you call it,
calculate,
carefully select result,
copy it,
go to field,
paste it.
Have you ever done much data entry?
I downloaded the popup calculator Majp posted (who knew there was such a thing?). I like it but now I want to get fussy:
1. I set the equal button to default so I could press enter without it closing so I can see what the value is before accepting it. Doesn't work
2. Why doesn't the calculated...