Case select syntax

  • Thread starter Thread starter maceslin
  • Start date Start date
M

maceslin

When exit cboDOTMLPF on frmSolutions I am trying to use case select to
populate cboSolLoc on subfrmSolLoc with the following code (only one
of 8 cases)

Private sub cboDOTMLPF_Exit(Cancel as integer)
Select Case cboDOTMLPF.value
 
When exit cboDOTMLPF on frmSolutions I am trying to use case select to
populate cboSolLoc on subfrmSolLoc with the following code (only one
of 8 cases)

Private sub cboDOTMLPF_Exit(Cancel as integer)
Select Case cboDOTMLPF.value

Machine hiccuped- lets try again
When exit cboDOTMLPF on frmSolutions I am trying to use case select to
populate cboSolLoc on subfrmSolLoc with the following code (only one
of 8 cases)

Private sub cboDOTMLPF_Exit(Cancel as integer)
Select Case cboDOTMLPF.value
Case Doctrine
frmSolLoc!cboSolLoc.RecordSource=tblDoctrineSolLoc.DoctrineSolLoc

End Select
End Case

There is nothing in cboSolLoc

ANy ideas what wrong with syntax?

Thanks
Dave
 
Two points:

Point 1:
Case Doctrine

If Doctrine is supposed to be a literal value, it should be enclosed in
quotes:

Case "Doctrine"

Point 2:
frmSolLoc!cboSolLoc.RecordSource=tblDoctrineSolLoc.DoctrineSolLoc

Combo boxes don't have a RecordSource property; it's "RowSource". So
*maybe* your line of code should be:

frmSolLoc!cboSolLoc.RowSource=tblDoctrineSolLoc.DoctrineSolLoc

But I don't understand what "tblDoctrineSolLoc.DoctrineSolLoc" is supposed
to be. Are you trying to set the rowsource to a query that selects the
field DoctrineSolLoc from table tblDoctrineSolLoc? If so, the above line
should probably be this instead:

frmSolLoc!cboSolLoc.RowSource = _
"SELECT DoctrineSolLoc FROM tblDoctrineSolLoc"

It's all guessing, though, because your explanation was rather vague.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


When exit cboDOTMLPF on frmSolutions I am trying to use case select to
populate cboSolLoc on subfrmSolLoc with the following code (only one
of 8 cases)

Private sub cboDOTMLPF_Exit(Cancel as integer)
Select Case cboDOTMLPF.value

Machine hiccuped- lets try again
When exit cboDOTMLPF on frmSolutions I am trying to use case select to
populate cboSolLoc on subfrmSolLoc with the following code (only one
of 8 cases)

Private sub cboDOTMLPF_Exit(Cancel as integer)
Select Case cboDOTMLPF.value
Case Doctrine
frmSolLoc!cboSolLoc.RecordSource=tblDoctrineSolLoc.DoctrineSolLoc

End Select
End Case

There is nothing in cboSolLoc

ANy ideas what wrong with syntax?

Thanks
Dave
 
When exit cboDOTMLPF on frmSolutions I am trying to use case select to
populate cboSolLoc on subfrmSolLoc with the following code (only one
of 8 cases)

Private sub cboDOTMLPF_Exit(Cancel as integer)
Select Case cboDOTMLPF.value

Machine hiccuped- lets try again
When exit cboDOTMLPF on frmSolutions I am trying to use case select to
populate cboSolLoc on subfrmSolLoc with the following code (only one
of 8 cases)

Private sub cboDOTMLPF_Exit(Cancel as integer)
Select Case cboDOTMLPF.value
Case Doctrine
frmSolLoc!cboSolLoc.RecordSource=tblDoctrineSolLoc.DoctrineSolLoc

End Select
End Case

There is nothing in cboSolLoc

ANy ideas what wrong with syntax?

Thanks
Dave

No such thing as End Case in VB(A). Remove that line.
 
Good spot.  I didn't notice that.

All good comments- it was the end of a long day and U should have jsut
backed off and relooked at it tomm, suspect above will fix all for me
 
Back
Top