Okay, so you are saying that the form for any given equipment will be "Palletizer% CILF 99999" where % is 1-9 and 99999 is the equipment number.
Okay, we can work with that. There's code various places that will give you all form names in the database. Let me look it up.
Try this -
Code:
SELECT [Name]
FROM MSysObjects
WHERE Type = -32768
AND [NAME] LIKE "Palletizer* CILF " & EquipmentNumber
or
Code:
strFormName = "" & DLookup("[Name]","[MSysObjects]","[Type] = -32768 AND [NAME] LIKE 'Palletizer% CILF " & EquipmentName & "'")
ref: http://bytes.com/topic/access/answer...forms-database
http://compgroups.net/comp.databases...tabase/1465876