B
babs
I have the below code attached to the after update event of the clientid. I
would like to keep it the way it is but add code to make the DEFAULT job# be
the highest(last one) for that selected clientid. As of right now they can
select one from the list - GOOD but to input a NEW job he has to look down
and see the highest number job on the list and add 1 - sometimes there are
mistakes and think you should be able to set the default to do this.
Please help me add code below for the default job# as explained above.
Private Sub cboClientId_AfterUpdate()
Dim sSql As String
Dim nsql As String
'This function sets the RowSource of ClientId, based on the value selected
in ClientId
sSql = "SELECT DISTINCT Job, Taxex, Jobdesc, ClientId " & "FROM tblQUOTEJOE
" & "WHERE ClientId = """ & Me.cboClientId & """ " & "ORDER BY Job"
Me.cbojob.RowSource = sSql
'This function sets the RowSource of ClientId, based on the value selected
in ClientId
nsql = "SELECT DISTINCT Taxex,job, ClientId " & "FROM tbltaxexempt " &
"WHERE ClientId = """ & Me.cboClientId & """ " & "ORDER BY job"
Me.cbotaxex.RowSource = nsql
End Sub
thanks,
Barb
would like to keep it the way it is but add code to make the DEFAULT job# be
the highest(last one) for that selected clientid. As of right now they can
select one from the list - GOOD but to input a NEW job he has to look down
and see the highest number job on the list and add 1 - sometimes there are
mistakes and think you should be able to set the default to do this.
Please help me add code below for the default job# as explained above.
Private Sub cboClientId_AfterUpdate()
Dim sSql As String
Dim nsql As String
'This function sets the RowSource of ClientId, based on the value selected
in ClientId
sSql = "SELECT DISTINCT Job, Taxex, Jobdesc, ClientId " & "FROM tblQUOTEJOE
" & "WHERE ClientId = """ & Me.cboClientId & """ " & "ORDER BY Job"
Me.cbojob.RowSource = sSql
'This function sets the RowSource of ClientId, based on the value selected
in ClientId
nsql = "SELECT DISTINCT Taxex,job, ClientId " & "FROM tbltaxexempt " &
"WHERE ClientId = """ & Me.cboClientId & """ " & "ORDER BY job"
Me.cbotaxex.RowSource = nsql
End Sub
thanks,
Barb