you can use the Top X predicate
Select Top 1 * from sometable order by ContactID Desc
This returns the last record.
You could query on the max
Select * from someTable where ContactID = dmax("ContactID","SomeTable")
But you ask 2 different things.
You want the most recent record
Or do you...
I looked at the example and it is acting as expected. It needs a line of code to make it work. If you need this solution then you can simply do a full load and it will work. If you need a solution that allows you to do a light load but still mark all descendants then simply modify the code to...
That would do it because in the light load not all the descendants are loaded. Only enough to show the expander icons. So that is just offspring for that visible level.
I could write additional code to check and overcome this condition. It would first expand all levels below the selected...
Assuming you do not always have equal groups you would want to make sure that employee x is not always getting the remainder so you would want to assign them each time in a different order.
Public Sub AssignRandom()
Dim EmployeeCount As Integer
Dim CityCount As Integer
Dim...
Are you open to a code suggestion where you push the results into a temp table. The reason is you can do a query that pulls a random number between 1 and N, but that will assign the assignments randomly, but not ensure that the groups are as equal as possible. They may be close to equal but not...
Yes, but only in print Preview and not in FormView
You can set the filter in onopen, but you need to turn the filter on in the onload event. Or simply do everything in the onload and it works in formview and print preview.
I agree not sure why you would want to set the filter in the load event...
No difference. The issue is that the filteron must be moved to the onload. The filter will be applied in the on open but for some reason it is to early to set filter on in the onopen and must be set later in the onload.
The reason this does not work is because you are opening the form in Report View and setting the filterOn in the on open event. I do not fully understand why this is, but if you set the filteron in the open event that event it too early to "stick".
Many work arounds but the simplest is just...
I am assuming that the combo is unbound, and that it is not linked to the subform.
So what code exists now in the combo to navigate to a new record?
I would assume you need something like this in the combo after update
if not IsNull(Me.SearchComboName) then
Me.filter = "someFieldID = " &...
The properties window is slidable. Check that it is not slid shut. That is why you are likely seeing a flicker, but no window. It is opening but "minimized" shut.
That does not do a repaint of the "database screen". That is referring to this window
As stated it is to refresh objects in that window that have been added, renamed, or removed via code.
I believe you mean it is not "repainting" the form. Refreshing is updating the data on the screen. You could try forcing a form.repaint, but you might be chasing the real issue. Try creating a new database and importing everything into that. If that fails you can try a database decompile...
In your approach it requires you to name your controls with a matching value in the option value. "B21 must have a value of 21". This requires a little bit of work in ensuring you named and valued them correctly.
My original suggestion is short, but requires diligence because the controls...
Pretty sure this is a "WHERE" not an "AND"
Case 1
strWhere2 = " AND qryIncExp.[Hide] = FALSE"
If not it makes a join that does not make any sense.
SELECT qryincexp.accountid,
qryincexp.accountname,
qryincexp.faccounttypeid,
tblcombo.data AS Type...
As I pointed out if done in the after update
Me.Controls(Me.Selalpha)
is almost guaranteed to return an object in the Controls collection just not very likely to be the one you want and likely not an option.
where
Me.SelAlpha.Controls(Me.Selalpha)
is guaranteed to return one of the options in...
Here is a demo with the correct syntax showing why the OPs original syntax will be a random control on the form and not the caption of the clicked control. It will fail if that random control does not have a caption property.
It is
Me.SelAlpha.Controls(me.selalpha.value)
not...
I do not think that syntax looks correct.
This assumes that you dropped all your controls in correct order. An options group has a controls collection like you show so in your case the first dropped control is "A" and has an index of 1.
So to get the caption of the clicked control
If...
This is just one of many ways to structure the interface. You can use a tab control on the form to create more real estate. You could put only Summary data on the dashboard and force a pop up for details. You can use continuous forms instead of datasheets for increased formatting.