Yes, you are right. I want the formula... So it should be a string that I'm adding to a string? And then want to calculate? And it should be a sub and not a function?
I have a combobox that I want to limit dates in a listbox:
Function DateCalculation(IDate As Integer)
Select Case IDate
Case 48 'All Dates
[CkDate]
Case 49 'This Month
Year([CkDate]) = Year(Date) And Month([CkDate]) = Month(Date)
Case 50 'Last...
This is a database for file drawers. Some drawers have divisions and folders. Some are completely numerical. As things get removed, the address stays but it becomes available for use. I want to locate the proper drawer, etc and use any old locations not being used or create new locations if none...
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...