Re: If Statement Referencing Sub-Forms

From: Dave Elliott (dave_at_dontgetshocked.com)
Date: 02/16/05


Date: Wed, 16 Feb 2005 13:44:21 GMT

This code still does not work???
TimeCards is the main form and code is being run from a sub-form named
Vendor_List

If Forms!frmTimeCards.Text414 >0 and Forms!frmTimeCards.Text416 =0 Then
MsgBox "Why is more material being put on this job"
End If

"Wayne Morgan" <comprev_gothroughthenewsgroup@hotmail.com> wrote in message
news:eJZwpo9EFHA.3404@TK2MSFTNGP10.phx.gbl...
> "Me." is shorthand for the form that the code is running on. From the
> Immediate Window you would have to specify the full path to the Parent
> form instead of Me, then give the path from there if you are referring to
> a subform.
>
> Example:
> Forms!frmParentForm.ControlName
> or
> Forms!frmParentForm.SubformControlName.Form.ControlName
>
> Also, you need to specify the full path to both textboxes.
>
> --
> Wayne Morgan
> MS Access MVP
>
>
> "Dave Elliott" <dontgetshocked@sbcglobal.net> wrote in message
> news:GPyQd.10430$D34.2498@newssvr12.news.prodigy.com...
>> Error says Variable not yet created in this context in immediate window
>>
>> If Me.Parent.[Text412] > 0 And [Text414] = 0 Then
>> MsgBox "Why is there more material on this job?"
>> End If
>
>



Relevant Pages

  • Re: how to change Application Title Bar of MS Access.
    ... The behavior of the Application Title and the Msgbox() function in Microsoft ... if you specify an Application Title under the Tools->Startup ... prpValue As Variant) As Integer ... > Dim db As DAO.Database, prp As DAO.Property, ws As DAO.Workspace ...
    (microsoft.public.access.setupconfig)
  • Re: Passing object names as arguements in functions
    ... Function testfunction(cvlistbox As Control) ... > Function testfunction(cvlistbox As Variant) ... > ' specify the list box ... > MsgBox "selection acknowledged" ...
    (microsoft.public.access.modulesdaovba)
  • Re: MsgBox problem
    ... Title = "Which MTS table?" ... With the MsgBox line, if I only specify Msg, everything is OK. ...
    (microsoft.public.excel.programming)
  • Re: Iserror with Search
    ... I see False when I do this in the immediate window. ... But VBA has its own version of application.search. ... Paul D Byrne wrote: ... If I use the msgbox in the immediate pane to see the result I get ...
    (microsoft.public.excel.programming)
  • Re: problem getting a value from Date()
    ... The MsgBox statement will not work in the Immediate Window. ... txtDate. ... I've also noticed that in the Immediate pane, ...
    (microsoft.public.access.formscoding)