1) I have had unpredictable form sizes before, but not locations. I can solve size problems if I open the form in design view, change the Auto Resize and Auto Center settings and save the form. Then open the form again in design view, and change those settings back.
2) There is an...
Say I have a class created in the FE based on FE data and the Library know nothing about it, say a cCustomer class with a CreateOrder method that returns a new cOrder instance. And say I want to run cCustomer.CreateOrder from the Library. In this case cCustomer can Implement IAction, which is...
You can define an interface in the Library, and then in the front end, implement that interface with custom functionality.
In the library, create a class called IAction that exposes a single method Public Function Execute(Optional dcn as Scripting.Dictionary) as Variant.
Now, in clients of...
Is that all you have? Those stories are outrage-engine clickbait. In America you used to be able to buy and sell human beings.
The arc of history tends towards justice. If you disagree, you are probably selling something.
If was your programmer, I would ask for the whole system, your FE and your BE. I would then make the requested changes to the FE. Then I would return the FE to you for testing, with an incremented version number, and a description of the changes made under that version number. If you are...
The difficult and error-prone problem of cobbling together SQL statements in code is why DAO allows you to create and run a temporary QueryDef. Here's a code example...
Private Const SQL_INSERT_SCORE As String = _
"INSERT INTO tblTestScores " & _
"( dtTestDate, numScore...
You can also do this...
Function FieldExists(table As String, field As String) As Boolean
On Error Resume Next
FieldExists = CurrentDb.TableDefs(table).Fields(field).Name = field
End Function
I timed them both on a seven column table, looking for the last column in the table, and they are...
Look at this block of code...
If Me.ckPrimaryDiag Then strVisibleColumns = strVisibleColumns & "PrimaryDiag, "
If Me.ckSecondaryDiag Then strVisibleColumns = strVisibleColumns & "SecondaryDiag, "
If Me.ckDateEntered Then strVisibleColumns = strVisibleColumns & "DateEntered, "
If...
It may also be important to note in this discussion that the VBA TypeOf operator can distinguish if an object implements an interface. Say you have an Access.Form called Form_Form1 and it implements IKitayamaControls and INavBarHost, then the following code...
Dim frm As New Form_Form1...
You also don't have to compare a boolean to True or False in order to determine if it is True or False, since, as a boolean, it is already True or False. As a result you can do....
Me.Chk1Discipline = Me.Chk2Discipline And Me.Chk3Discipline And Me.Chk4Discipline ...
Yes. Understanding national defence spending policies of NATO member states? Just like gym dues. This is what I love about Trump and his followers: They can take complex and nuanced political and economic issues, and frame them so simply, that even an idiot can understand.
You can also do...
Function GetLeastDate(ParamArray dates()) As Date
Dim var
With CreateObject("System.Collections.ArrayList")
For Each var In dates
If IsDate(var) Then .Add CDate(var)
Next
.Sort
GetLeastDate = .Item(0)
End With...
IMO, this is the most readable, maintainable, and reliable way to do that job, for your consideration...
Const SQL As String = _
"INSERT INTO TransactionTable " & _
"( TheDate, Amount, Account ) " & _
"VALUES " & _
"( p0, p1, p2 )"...
The problem is that this code...
DoCmd.Close acForm, "[" & obj.Name & "]"
...does not actually close the form, and you don't realize it, because they are all hidden.
In your DoCmd.OpenForm, command, try and open them such they are not hidden, and see if they are actually closing or not.
If you want to persist, between openings and closings of the form, the selected state of individual rows in a ListBox, you will need to persist the selected state of each row somewhere, somehow. Do you have such a structure in place?
If you set a reference to mscorlib, you can use a class called SortedList, which sorts objects by key. Here is a code sample, and output...
Sub Test()
Dim csl As New mscorlib.SortedList
Dim i As Integer
csl.Add "Key", "Value"
csl.Add "Zebra", "Has Stripes"
csl.Add...