Question : Verify form is complete

I have a form with a combobox (orderedBy) and textbox(package) on it, as well as other controls. These two controls are ones that I want to verify are filled out. I know I can make them required in the table, but I want to pretty it up a bit. Here is my code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
If Me.package.Text = "" And IsNull(Me.orderedBy) Then
MsgBox ("Please choose a name from the Ordered By box")
Else
    RunCommand acCmdSaveRecord
    RunCommand acCmdSaveRecord
    DoCmd.SendObject acSendReport, "receiving Query", acFormatRTF, Me.orderedBy.Column(1), , , "Package: " & package & " arrived at " & receivedDate, , False
    DoCmd.Close acForm, "receiving", acSaveNo
    
End If
End Sub


I have tried several versions of this and have been unsuccessful. Any ideas? Thanks for any help. I know this is probably simple.

Answer : Verify form is complete

There are many SQL Server operations that use tempdb to perform sorts and things like that.  Tempdb may bloat to very large sizes.  Restarting SQL Server will shrink tempdb since it's recreated every time SQL starts.  However, this may not be an option in your environment.

Best practice is to put tempdb on a separate disk and make sure it's adequately sized for your day to day operations.

FWIW, temp tables should be automatically destroyed when the connection that created them is dropped.  Table variables are good if you have the memory to support them.
Random Solutions  
 
programming4us programming4us