'val = (ctrl.Column(TheColumn, ctrl.ItemsSelected(I)))
The above commented out statement also can be corrected as below:
val = ctrl.Column(TheColumn,I)
Since "I" already represents the selected ListBox Item, it is not necessary to repeat ctrl.ItemsSelected(I) as second parameter. It...
For I = 0 To ctrl.ItemsSelected.Count - 1
val = ctrl.Column(TheColumn, I)
If IsNull(val) Then
Debug.Print "Null" 'verify NULL
'call same code again and it returns proper value
'val = (ctrl.Column(TheColumn, ctrl.ItemsSelected(I)))
Else...
Public Function Pause(dblInterval As Double)
Dim Start As Double
Start = Timer
Do While Timer < Start + interval
DoEvents 'Pass control to the processor to finish other waiting tasks in queue
Loop
End Function
The Tip-Text for each text box can be saved in their Tag Property and display it in a Label Caption, in the footer/Header of the Form, on the GotFocus() Event:
Private Sub Units_GotFocus()
Me.Label2.Caption = Units.Tag
End Sub
I have tried something to detect idle time and to invoke a slide-show on the Control Screen. The method used is to check the active control on the Form and runs a timer and if the same control remains active for a certain period it assumes that the Application is idle for that much time and the...
Here is another example that loads multiple instances of the Form with different information in memory and displays two of them on the Screen at the same time:
Public Function frmInstanceTest()
'Create first instance of the form frmEmployees
'and opens it in memory(not visible in application...
This Article was published during July 2008 for Formatting PIE Chart using VBA Code. If nothing works give it a try: PIE Chart Object and VBA.
You will find links for other type of Graph Charts, with manual formatting and with Code as well, at the end of the Post.
Create a New Form with a Label Control with the Name: Label0.
Copy and Paste the following code into the Form Module.
Option Compare Database
Option Explicit
Dim x As Double, y As Integer
Private Sub Form_Load()
x = 20: y = 60
Me.TimerInterval = 1000
End Sub
Private Sub Form_Timer()
y...
Check with your Network Administrator about your Disk-Quota Allocation. You need double the size of your Database Free Space on Server to Compact your large database.
If you don't mind spending some time to copy paste some Code, try this link for duplicating fields from previous record: https://www.msaccesstips.com/2012/02/duplicating-fields-with-conditional.html
Sent from my iPhone using Tapatalk
Public Function Date2txt(ByVal dt As Date) As String
Dim txt As String, num As Integer
num = Day(dt)
Select Case num
Case 1, 21, 31
txt = "st "
Case 2, 22
txt = "nd "
Case 3, 23
txt = "rd "
Case 4 To 20, 24 To 30
txt = "th "...