Scenario: Looking to have a list of Standard Maintenance Group Items and Last Done info on the EM Equipment Form
- Open the VA Inquiries form
- Enter udEMStandardMaintenanceItems in the Query Name field
- Enter Equipment Standard Maintenance Items in the title and description fields
- Type = SQL
- Query Text list at the bottom.
- Change Column as desired in Columns tab
- Setup Parameters as follows:
- @EQ, Type = 4, Datatype = bEquip
- @EMCo, Type 0, Value = 1, Datatype = bEMCo
- Save and Open EMEquipmentForm Inquiry
- On Links tab add udEMStandardMaintenanceItems in Related Query Field
- Set Display Seq = 1
- Double Click the udEMStandardMaintenanceItems record to load the Inquiry links form and set @EQ = Equipment and @EMCo to use default value.
- Open EM Equipment Form
- Open Form Properties from the Tools menu
- Add a tab page Maintenance Items on the Tab Pages tab.
- Select Maintenance Items tab and click edit
- Set Control Type to 3 and select
udEMStandardMaintenanceItems in the Query Name field.
- Save and close/reopen forms.
- Test tab to validate functionality.
select s.StdMaintGroup, s.Description as GroupDescription, i.Description as ItemDescription, i.LastDoneDate, i.LastHourMeter, i.LastOdometer FROM bEMSH s (Nolock) LEFT OUTER JOIN bEMEM e (Nolock) on s.Equipment = e.Equipment and s.EMCo = e.EMCo LEFT OUTER JOIN bEMSI i (NoLock) on s.Equipment = i.Equipment and s.EMCo = i.EMCo and s.StdMaintGroup = i.StdMaintGroup where s.Equipment = @EQ and s.EMCo = @EMCo