On 25 Jun, 11:58, Mike <M...@discussions.microsoft.com> wrote:
> DTPicker1.Enabled = True
>
>
>
> "matthew.dal...@aktivkapital.co.uk" wrote:
> > On 22 Jun, 13:26, Mike <M...@discussions.microsoft.com> wrote:
> > > Post your code Boolean Validation code should not be a problem
>
> > > "matthew.dal...@aktivkapital.co.uk" wrote:
> > > > On 20 Jun, 22:54, Mike <M...@discussions.microsoft.com> wrote:
> > > > > What is a blnvalid code ?
>
> > > > > "matthew.dal...@aktivkapital.co.uk" wrote:
> > > > > > Hello all,
>
> > > > > > I have created a userform with a DT picker. The problem I am having is
> > > > > > that I am trying to make the user enter a date using the date picker
> > > > > > by using a blnvalid code. It seems to work fine with everything else
> > > > > > but not with the DT picker. Any ideas?- Hide quoted text -
>
> > > > > - Show quoted text -
>
> > > > It is a Boolean Validation code- Hide quoted text -
>
> > > - Show quoted text -
>
> > Private Sub Ok_Click()
> > Dim BlnValid As Boolean
> > BlnValid = True
> > If PortfolioName.Value = "" Or _
> > ContractualParty.ListIndex < 0 Or _
> > TypeOfCredit.ListIndex < 0 Or _
> > Vendor.ListIndex < 0 Or _
> > ClientCode.ListIndex < 0 Or _
> > DTPicker1.Enabled = False Or _
> > Category.ListIndex < 0 Or _
> > TypeOfContract.ListIndex < 0 Or _
> > UID.Value = "" Or _
> > Debts.Value = "" Or _
> > FaceValue.Value = "" Or _
> > AcquisitionCost.Value = "" Or _
> > Owner.ListIndex < 0 Or _
> > CurrencyBox.ListIndex < 0 Or _
> > FirstYearCash.Value = "" Or _
> > Year2Decay.Value = "" Or _
> > Year3Decay.Value = "" Or _
> > Year4Decay.Value = "" Or _
> > Year5Decay.Value = "" Or _
> > Year6Decay.Value = "" Or _
> > Year7Decay.Value = "" Or _
> > Year8Decay.Value = "" Or _
> > Year9Decay.Value = "" Or _
> > Year10Decay.Value = "" Then
> > BlnValid = False
> > MsgBox ("You must complete all sections with white boxes."),
> > vbCritical, "Error"
> > End If
> > If BlnValid Then Update
> > End Sub- Hide quoted text -
>
> - Show quoted text -
All that does is check whether the DTPicker is enabled. What I want it
to do is force the user to pick a date. There is the possibility of
using a check box on the DTPicker if anyone knows how to setup a
Blnvalid based on that?
|