Use OnUpdate event to clarify the check box status.
Private Sub Check0_AfterUpdate()
If Me.Check0 = True Then
MsgBox "The check box is TRUE now", vbOKOnly
End If
End Sub
Here's the code. I assume your table called tblCustomers with ID field.
Private Sub ID_DblClick(Cancel As Integer)
Dim intMax As Integer
Dim strPrefix As String
strPrefix = "PRO-02-"
If Me.ID = "" Or IsNull(Me.ID) Then
If IsNull(DMax("Val(Mid([ID],8))", "tblCustomers")) Then...
Will this part, "PRO-02-", change over time? If so, what do they stand for? If not, why do you want the prefix? If you want to display the prefix, just add it when you want to show it only.
If you insist, I will give the code.
I have written this piece of code 2 years ago. Modify it to fit your need. Some parts in the code were cut out.
Function CleanUp()
Dim strLink As String
Dim strAllText As String
Dim I As Integer
Dim strOld As String, strNew As String
'strOld = "h:\html\" & strHTML
'strNew = "h:\html\old\" &...
Search this forum for Mailmerge keyword and also search the Microsoft Knowledge Based Articles for send data to word keyword. You should find what you are after then.
Or give me more detail about the mailmerge in word. What fields you're sending out? What's in the template file? What field you...
I assume the report is based on a query. Just add one more field to the query with its name like this.
MySort: mid([YouPrimaryKeyField],4,3)
Sort: Ascending
Then in your report, just sort it with MySort field.
Check the sample dbs at http://www.helenfeddema.com/CodeSamples.htm, and look at the Outlook part.
Try this.
strFolder = "C:\DUMP"
If Dir(strFolder,vbDirectory) = "" Then
MsgBox "Could not get Temp folder", vbOKOnly
GoTo ExitSub
End If
You don't need the frame. Just store the doc name (xxx.doc) in a text field. Then on a form, add a command button next to the doc field text box. Add the code below to the command on On Click event.
Private Sub Command0_Click()
Dim strFileName As String
If Me.DocFileName <>"" Or Not...
I guess the line below causes the problem.
...
rcdCRef.FindFirst "ContractID = lngCRef"
...
Change it to
...
rcdCRef.FindFirst "ContractID = " & lngCRef
...
Try this.
Dim intShiftDown As Integer, intAltDown As Integer
Dim intCtrlDown As Integer ', Shift As Integer
Private Sub Form_Load()
Me.KeyPreview = True
End Sub
Private Sub cmdKeyDown_Click()
If intShiftDown Then MsgBox "You pressed the SHIFT key."
If intAltDown Then MsgBox "You...
You'd better use Active Server Pages (ASP) to help. Just vist http://www.aspfree.com or http://www.asp101.com.
There are some good samples for you to start with.
Since when you are adding the new record, this record is not saved to the bound table yet. So you won't see the Client Name in the form.
Just save the newly entered record then press F9 to refresh the form. Now you will see the info there.
You have to change the Registry of the program you want to open with this file extension. Just open the Windows Explorer, find the picture file you want>right click on its name>click Open With>Choose program...>look for the program you want to open this file and then mark Always use this program...