> Ok Bruce,
> I now have the DAO ref Lib checked and I'm getting past that compile
> error.
> I now have another compile error on this line, Set rs =
> Me.DateOff.Form.RecordsetClone with the DateOff highlighted.
>
> Again,
> Name of Main Form = "WO_Form"
> Name of Subform = " "
> Name of control on subform = "DateOff"
>
> Shouldn't there be a reference of some kind to the Splits_Form, since it
> is
> the subform that holds the DateOff txtbox?
>
> Also, does this code look correct. (***)
> Do While Not rs.EOF
> *** If rs("DateOff.backcolor") = vbRed Then ***
> bLabelVisible = True
> Exit Do
> End If
>
> I feel it's close!
> Wallymeister
>
> "BruceM" wrote:
>
>> When you click Tools >> References in the VBA editor, what is checked?
>> Not
>> the file locations, just the basic information.
>>
>> In Allen Browne's web page he wrote: "The three essentials are VBA,
>> Access,
>> DAO." You have not mentioned the DAO library reference. If you do not
>> have
>> it you will get the error you describe no matter the version of Access.
>>
>> By the way, I think you need only the Office 11 reference, but somebody
>> else
>> will have to confirm or refute that.
>>
>> Microsoft Access 2000 and 2002 did not include the DAO library reference
>> by
>> default. Access 2003 did. You will probably need to add the reference.
>> The article has all the information you should need, either in the
>> article
>> or in one of the links. I can't write anything here that does not
>> duplicate
>> information in the links.
>>
>> "wallymeister" <wallymeister[ at ]discussions.microsoft.com> wrote in message
>> news:2517B194-754E-42F9-AAB2-DDB10F88A1EC[ at ]microsoft.com...
>> > Yes I checked the the references and they are as below...
>> >
>> > 2003 11.0 C:\Program Files\Microsoft Office\Office11\msacc.olb
>> > 2002 10.0 C:\Program Files\Microsoft Office\Office10\msacc.olb
>> > 2000 9.0 C:\Program Files\Microsoft Office\Office\msacc9.olb
>> >
>> > The way I'm understanding this they aren't the same. Point being that
>> > 2000
>> > uses msacc9.olb & 2002/2003 uses msacc.olb.
>> >
>> > I guess I could make a copy of the program and convert to 2003 and see
>> > if
>> > that makes a difference.
>> >
>> > Still trying,
>> > Wallymeister
>> >
>> > "BruceM" wrote:
>> >
>> >> I think they both use the same library reference for DAO. Did you
>> >> check
>> >> the
>> >> references as described in the link?
>> >>
>> >> You can use Access 2000 file format for Access 2003 files. You can
>> >> just
>> >> leave it that way, or I think you can convert it when the project is
>> >> done.
>> >> Where I work there are still some machines with Access 2000, so I
>> >> always
>> >> use
>> >> that file format. Because of that I'm not very familiar with
>> >> converting
>> >> to
>> >> another file format.
>> >>
>> >> "wallymeister" <wallymeister[ at ]discussions.microsoft.com> wrote in
>> >> message
>> >> news:EEBD0985-181B-4FBF-9D1F-4A69B2E6E33B[ at ]microsoft.com...
>> >> > Hey Bruce
>> >> > I'm using Access 2003 at work and I started the project at home on
>> >> > my
>> >> > Access
>> >> > 2000. Could this be the problem. I don't want to convert the
>> >> > database
>> >> > to
>> >> > 2003 because I don't believe I will be able to work on it at home on
>> >> > my
>> >> > 2000
>> >> > if I do. Need to make some more progress on this project before I
>> >> > convert.
>> >> > Thanks
>> >> > Wallymeister
>> >> >
>> >> > "BruceM" wrote:
>> >> >
>> >> >> You may have a references problem. See here for more information:
>> >> >>
http://allenbrowne.com/ser-38.html>> >> >>
>> >> >> Specifically, it could be that you are lacking a reference to the
>> >> >> Microsoft
>> >> >> DAO 3.x Object Library. The x is because I don't know your version
>> >> >> of
>> >> >> Access. In 2007 it is called something other than DAO Object
>> >> >> Library.
>> >> >> The
>> >> >> link has details.
>> >> >>
>> >> >>
>> >> >> "wallymeister" <wallymeister[ at ]discussions.microsoft.com> wrote in
>> >> >> message
>> >> >> news:8AC60A08-9604-42F3-81D6-08BB15515E8A[ at ]microsoft.com...
>> >> >> > Ok
>> >> >> > Name of Main Form = "WO_Form"
>> >> >> > Name of Subform = " Splits_Form"
>> >> >> > Name of control on subform = "DateOff"
>> >> >> >
>> >> >> > I tried this code in the On_Current event of the main form...
>> >> >> > Dim rs As DAO.Recordset
>> >> >> > Dim bLabelVisible As Boolean
>> >> >> >
>> >> >> > bLabelVisible = False
>> >> >> > Set rs = Me.DateOff.Form.RecordsetClone
>> >> >> > Do While Not rs.EOF
>> >> >> > If rs("DateOff.backcolor") = vbRed Then
>> >> >> > bLabelVisible = True
>> >> >> > Exit Do
>> >> >> > End If
>> >> >> > rs.MoveNext
>> >> >> > Loop
>> >> >> > rs.Close
>> >> >> > Set rs = Nothing
>> >> >> > Me.lblHighlightDesc.Visible = bLabelVisible
>> >> >> >
>> >> >> > The above line Dim rs As DAO.Recordset produces complie error
>> >> >> > "User
>> >> >> > defined
>> >> >> > type not defined"
>> >> >> >
>> >> >> > Not sure whats happening here. Do you see any other potential
>> >> >> > problems?
>> >> >> >
>> >> >> > Thanks again,
>> >> >> > Wallymeister
>> >> >> >
>> >> >> > "wallymeister" wrote:
>> >> >> >
>> >> >> >> Dale,
>> >> >> >> It really doesn't matter if that row is visible or not. I can
>> >> >> >> say
>> >> >> >> that
>> >> >> >> 99.44% of the time all rows in this datasheet will be visible on
>> >> >> >> all
>> >> >> >> records
>> >> >> >> of the main form. Just as long as if there is an instance of
>> >> >> >> this
>> >> >> >> highlight
>> >> >> >> in current record then this explaination lbl will become
>> >> >> >> visible.
>> >> >> >> I
>> >> >> >> will
>> >> >> >> try
>> >> >> >> you suggestion and get back to you. Thanks so much, you are
>> >> >> >> being
>> >> >> >> very
>> >> >> >> helpful.
>> >> >> >>
>> >> >> >> Wallymeister
>> >> >> >>
>> >> >> >> "Dale Fye" wrote:
>> >> >> >>
>> >> >> >> > Wally,
>> >> >> >> >
>> >> >> >> > If you mean "any row" in the datasheet, not just the ones that
>> >> >> >> > are
>> >> >> >> > visible,
>> >> >> >> > that is another story entirely.
>> >> >> >> >
>> >> >> >> > I think you could put some code similar to the following in
>> >> >> >> > the
>> >> >> >> > Current
>> >> >> >> > event of your main form.
>> >> >> >> >
>> >> >> >> > Private Sub Form_Current
>> >> >> >> >
>> >> >> >> > Dim rs as DAO.recordset
>> >> >> >> > Dim bLabelVisible as boolean
>> >> >> >> >
>> >> >> >> > bLabelVisible = False
>> >> >> >> > set rs = me.subFormControlName.Form.recordsetclone
>> >> >> >> > do While not rs.eof
>> >> >> >> > if rs("field1") = "some value" AND rs("field2") = 3
>> >> >> >> > Then
>> >> >> >> > bLabelVisible = true
>> >> >> >> > Exit do
>> >> >> >> > endif
>> >> >> >> > rs.movenext
>> >> >> >> > Loop
>> >> >> >> > rs.close
>> >> >> >> > set rs = nothing
>> >> >> >> > me.lblDescription.visible = bLabelVisible
>> >> >> >> >
>> >> >> >> > End Sub
>> >> >> >> >
>> >> >> >> > Note that you will have to use the name of the subform
>> >> >> >> > control,
>> >> >> >> > not
>> >> >> >> > the
>> >> >> >> > name
>> >> >> >> > of the subform as seen in the database window or navigation
>> >> >> >> > pane.
>> >> >> >> >
>> >> >> >> > --
>> >> >> >> > HTH
>> >> >> >> > Dale
>> >> >> >> >
>> >> >> >> > email address is invalid
>> >> >> >> > Please reply to newsgroup only.
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > "wallymeister" wrote:
>> >> >> >> >
>> >> >> >> > > Dale,
>> >> >> >> > > Yes I do mean that I would like to unhide the lbl when any
>> >> >> >> > > row
>> >> >> >> > > in
>> >> >> >> > > subform
>> >> >> >> > > has a highlighted txtbox. If possible. For my own
>> >> >> >> > > programming
>> >> >> >> > > advancement I
>> >> >> >> > > sometimes dream stuff up and then try to tackle the task.
>> >> >> >> > > This
>> >> >> >> > > is
>> >> >> >> > > not
>> >> >> >> > > something I absolutley have to do, but I want to.
>> >> >> >> > >
>> >> >> >> > > I thought that if I could highlight the txtbox in a
>> >> >> >> > > subrouotine
>> >> >> >> > > instead of
>> >> >> >> > > using conditional formatting I could easily hide & unhide in
>> >> >> >> > > that
>> >> >> >> > > same
>> >> >> >> > > routine. I think this would require a loop through all
>> >> >> >> > > records
>> >> >> >> > > in
>> >> >> >> > > subform
>> >> >> >> > > from on_current event of that subform but I have never done
>> >> >> >> > > this
>> >> >> >> > > before. I
>> >> >> >> > > have looped thru cells with code in VB for excel though.
>> >> >> >> > > Anyway
>> >> >> >> > > thanks for
>> >> >> >> > > your input, and I'll keep at it until I Git'R'Done.
>> >> >> >> > >
>> >> >> >> > > Wallymeister
>> >> >> >> > >
>> >> >> >> > > "Dale Fye" wrote:
>> >> >> >> > >
>> >> >> >> > > > If you mean, is there a way to determine whether one of
>> >> >> >> > > > the
>> >> >> >> > > > rows
>> >> >> >> > > > that is
>> >> >> >> > > > visible in the datasheet meets the condition, and then
>> >> >> >> > > > make
>> >> >> >> > > > the
>> >> >> >> > > > label
>> >> >> >> > > > visible, probably (but I so rarely use datasheets that I
>> >> >> >> > > > couldn't
>> >> >> >> > > > help you).
>> >> >> >> > > >
>> >> >> >> > > > However, if you mean, is there a way to display the label
>> >> >> >> > > > if
>> >> >> >> > > > the
>> >> >> >> > > > row or cell
>> >> >> >> > > > you click on in a datasheet meets the condition, I'd also
>> >> >> >> > > > say
>> >> >> >> > > > probably. I
>> >> >> >> > > > would try putting some code in the subforms Current event
>> >> >> >> > > > that
>> >> >> >> > > > looks
>> >> >> >> > > > something like:
>> >> >> >> > > >
>> >> >> >> > > > Private Sub Form_Current
>> >> >> >> > > >
>> >> >> >> > > > Dim bLabelVis as boolean
>> >> >> >> > > >
>> >> >> >> > > > bLabelVis = (Condition1 = true) and (Condition2 =
>> >> >> >> > > > true)
>> >> >> >> > > > and
>> >> >> >> > > > (condition3
>> >> >> >> > > > = true)
>> >> >> >> > > > me.parent.lbl_Description.visible = bLabelVis
>> >> >> >> > > >
>> >> >> >> > > > End Sub
>> >> >> >> > > > --
>> >> >> >> > > > HTH
>> >> >> >> > > > Dale
>> >> >> >> > > >
>> >> >> >> > > > email address is invalid
>> >> >> >> > > > Please reply to newsgroup only.
>> >> >> >> > > >
>> >> >> >> > > >
>> >> >> >> > > >
>> >> >> >> > > > "wallymeister" wrote:
>> >> >> >> > > >
>> >> >> >> > > > > I have a form with 2 subforms embedded. The first
>> >> >> >> > > > > subform
>> >> >> >> > > > > is
>> >> >> >> > > > > datasheet view
>> >> >> >> > > > > and I use conditional format to highlight a field in
>> >> >> >> > > > > that
>> >> >> >> > > > > form
>> >> >> >> > > > > based on a
>> >> >> >> > > > > condition. The condition is a rare condition so I would
>> >> >> >> > > > > like
>> >> >> >> > > > > to
>> >> >> >> > > > > place a lbl
>> >> >> >> > > > > on the main form that will explain what the highlight
>> >> >> >> > > > > means.
>> >> >> >> > > > > Basically make
>> >> >> >> > > > > visible everytime this condition is true and hide when
>> >> >> >> > > > > this
>> >> >> >> > > > > condition is
>> >> >> >> > > > > false. (as I navigate thru the records) Is there a way
>> >> >> >> > > > > to
>> >> >> >> > > > > do
>> >> >> >> > > > > this or am I
>> >> >> >> > > > > dreaming.
>> >> >> >> > > > >
>> >> >> >> > > > > Any help is greatly appreciated.
>> >> >> >> > > > > wally
>> >> >>
>> >> >>
>> >>
>> >>
>>
>>