Basically I want to hit a button on the switchboard, it looks at a table (where data was previously entered). This table has yes\no check boxes and if all the check boxes are ticked it returns a positive result with a green textbox and if it's false it returns nothing (or a result with a red text box would be ideal)
I can get it to create the form dynamically but that's about it.
here's what I have so far:
The table I want to get data from is called kits, and I did manage to get it to draw a result with Dlookup but that only returned one result.
Basically I'm building a status page of laptops for quick reference on what's available based on data in a table.
[code]
Sub NewControls()
Private Sub Command0_Click()
Const twipsPerInch As Long = 1440
DoCmd.Close acForm, "create new Form test" 'close current form
DoCmd.OpenForm "Stemplate", acDesign ' open stemplate in design
'create text box
With CreateControl(FormName:="Stemplate",ControlType:=a cTextBox, Section:=acDetail, Left:=2 * twipsPerInch, Top:=0.02 * twipsPerInch, Height:=1000, Width:=2500)
'set control properties
.Name = "txtTextBox"
.BackColor = RGB(0, 255, 0)
End With
DoCmd.OpenForm "Stemplate", acNormal
DoCmd.Restore
End Sub
[/CODE}