@MajP I'm getting variable not defined on the On load events "mdlNextControl"
Private Sub Form_Load()
Set AvailableTabs = mdlNextControl.GetSortedTabControls(Me)
Im trying to figure out how to move to next control after a selection from a popup. I cant use setfocus or go to control because the popup is used for a few different controls and i wouldn't know what controls next
Hello, I need to automatically move to the next control in my tab order on my form using VBA. What can I use to accomplish this?
Note: This isn't moving between Tabs in a Tab Control this is just moving to the next control using VBA...
Just don't forget, in order for you to show the menu's if you want to work on the DB you have to open the DB while holding the shift button and it will open in design view.
Sure....
On your main form (The first form that is opened), just put the VBA below in its on open event.
Private Sub Form_Open(Cancel As Integer)
DoCmd.ShowToolbar "Ribbon", acToolbarNo ' Hide ribbon
End Sub
Now in the same form put the code below its on close event.
Private Sub...
@moke123 how can I add validation on a multilistbox? The code works except if I have a multi select listbox it highlights red even though I have items selected.
I tried adding below but I get error 2455 " You entered an expression that has an invalid reference to the property ItemSelected"
If...
Thanks @pbaldy and @arnelgp
Function VerifyMainFormData(frm As Form) As Boolean
Dim ctl As Access.Control
Dim strErrCtlName As String
Dim strErrorMessage As String
Dim strMsgName As String
Dim blnNoValue As Boolean
For Each ctl In frm.Parent.Controls ' Refers to...
Hello im looping controls on my main from from my subform and I have one issue "So Far". I have a multi select listbox on my main form and the code below is saying there isn't data in my listbox because when ran it highlights it and there are several items selected so there are things there...
I did notice something, I commented out the .Range("D1:H5000").NumberFormat = "hh:mm:ss" to extract the excel workbook without errors then looked at the time field and it shows the 01/00/1900 but when I click on the 01/00/1900 in the workbook it shows the time after the 01/00/1900 in the formula...
I have a export to Excel and I keep getting an error message.
Runtime error '1004'
Numberformat method of Range failed
I and it takes me to a line in my code for a time field. The time in the excel workbook converts to 01/00/1900 for every record in the Excell workbook instead of the format...
@Gasman @arnelgp I figured it out I was right, I created a new DB and exported all tables, forms, querys etc. to it and ran it and now the menu at the top is gone as it was supposed to be while open.
This has happened to me before a long time ago and I can't remember why.... The startup code is no different than any of the other databases I have played with. I tried adding the acToolbarNo in both load and open events and I get the same results. What's weird and got me stumped is I can open...