Button on subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to create an application to keep track of client computer
inventory/software. I have a Parent form (SystemProfiles) that keeps general
company information with buttons that open up forms to keep track of router
and server information. I also have a subform (Client) that is used to keep
more detailed information on individual computers located at a specific
company location. The links all seem to be working as expected. On the
subform, however, I have put a button that is supposed to open up yet another
form (Software) that lists the software kept on a specific client computer.
This is where the problem comes in.

I get an error message when I press the software button on the subform:
"Object doesn't support this property or method." Although, in fact, the
form opens, it doesn't want to retain the information I put in there. I have
attempted some coding so that, if there is no associated Client record for a
company, an ID (ClientID) will be set for use in a new client record. One
variation of the coding I have used to try to make this work looks like this:
If Forms![SystemProfiles]![Client]![ClientID] <> [ClientID] Then
Forms![SystemProfiles]![Client]![ClientID] = [ClientID]
End If
(Yes, I know the brackets aren't necessary).

I think the error code I'm getting, however, may have to do with trying to
open a form from within a subform through a command button (and not with the
code shown above). If this assumption is correct, perhaps someone can point
me in the right direction. Any other suggestions would be more than welcome.
 
You've got one to many bangs(!) in there.

Allowable usages:
forms!frmname!controlname.property
forms!frmname!controlname.methodname

or

Forms!fSubformName.form!controlname.property/method
 
Back
Top