Expand|Select|Wrap|Line Numbers
- Private Sub Form_Load()
- Dim assID As Long
- assID = DMax("CLng(Right([LSI_Case_Number],3))", "Master_Log")
- Me.LSI_Case_Number = Month(Date) & Format(Year(Date), "yy") & "-" & Format(assID + 1, "000")
- End Sub
Next question:
I have a form that has all the variables from my main table: Master_Log, and one of the variables is Disposition.
Disposition is automatically filled in upon hitting enter(it depends on many of the variables in the form).
If the disposition says "rejected", I would like the case to be sent to the "Rejected" table(which is just an empty copy of the Master_Log), and deleted from the Master_Log.
I think I am supposed to use Docmd.runsql, but does it matter if try to use that command in an after_update Disposition. I think it does matter, it needs to be a DoSql sub.
Here is my poor attempt:
Expand|Select|Wrap|Line Numbers
- Private Sub DoSql()
- Dim SQL As String
- If Me.dispostion = "Reject" Then
- SQL = "APPEND Rejected"
- End If
- DoCmd.RunSQL SQL
- End Sub