Suzanne,
When the user clicks the report button,
1. Show an Input Box and ask for the name
2. Open a recordset and get the count for the entered name
3. If recordcount is > 0 then
'Open the report and show
Else
Msgbox "Invalid name"
'Do not open the report at all and...
Try this. Paste the following code in the LostFocus event of the Combo Box cmbComments.
If IsNull(cmbComments) Then
MsgBox "No value selected."
Else
Call cmbComments_AfterUpdate
End If
Hope this shud solve ur prob.
Use the TextBox.SelStart and TextBox.SelLength properties of the Text control.
TextBox.SetFocus
TextBox.SelStart = 1
TextBox.SelLength = Len(TextBox.Text)
This should help you.
Delete ur entire code, paste this and see.
DoCmd.TransferSpreadsheet acExport, , "wo_qry", "C:\WO\WO_Report.xls", True
I think u are opening and clearing the contents of the excel file every time before u export. Instead of this u delete the file and then run the above code. It will...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.