Using a MS Access Tab Control for Navigation - forms

I'm scratching my head whether this idea is worth exploring:
I'd like to use a tab control to filter a subform field by the value of the tab control page. There are about 5 different values for that field, so it would be neat to have 5 tabs where you click on the tab and see the list of just those matching records.
I'm a bit of an Access 2007 neophyte (haven't designed a DB with Access in years), so these are the problems that need to be solved with this approach.
Is it possible to have the same subform show on every Tab control page?
What's the most efficient way to link the value of the tab to the subform query?
I realize the brain-dead way to do this is simply create a separate subform for each page, but this seems rather inefficient. Or is it?

If you're filtering the same data, you don't need five copies of the subform, you just need to trigger a change of the Recordsource of the subform or apply a filter to it.
There are two approaches I'd consider:
use a tab, but use it just as a tab strip, with the subform not embedded on any page of the form, but below it. In the tab's OnChange event, filter the subform appropriately.
use an option group with toggle buttons and in the AfterUpdate event, filter the subform. This will look just like the tab control with the Style property set to Buttons.

Related

Requery a subform within a tab control

I have several controls on this form in addition to a tab control with 3 separate pages. I want the subform(s) within each page to requery when a value is selected on the page above.
So for the purposes of explaining this..
I have an event On_Click() on a field called Address_ID. It's meant to take tha value of that ID in addition to two other IDs, Cust_ID and Location_ID, and requery the subform Order_Sub within the Orders page.
I've named the tab control pretty blandly, just tabCtl.
So far I've tried every way imaginable to reference the subform, but to no avail.
Forms!Record_Details!Orders!Orders_Sub.Requery
That doesn't work, but I assume that it should. What gives?
Steve
You do not need to reference the tab control in your code. Just reference and requery the subform itself
Forms.Record_Details.Form.Orders_Sub.Requery

Tracking form properties besides fields

I have a multi-page form, using a vertical tabs UI, in redux-form, and I'd like to track the current tab selection in the redux-form store.
What's the best way of doing this?
I would track the current tab selection outside of redux-form, but I've integrated redux-form with redux-undo, and I'd really like for undoing a form change to go back to the tab of the modified control.
I tried using a selected redux-form field, but this means that changing the selected tab marks the form as dirty.
From reading the docs, I could probably use reducer.plugin to add arbitrary properties to the redux-form store, but I don't see any documentation of which arbitrary property names are "safe," and I'd have to update the plugin for every form that should behave this way.
Any ideas?

How to Filter On Load with Microsoft Access Navigation Forms

I have a Navigation Form with 3 tabs. Homes, Customer, Decor.
On the Navigation Form, I have an unbound field LOTNUMSELECT.
On the Subform within the each tab, it has a field called LOT_NUMBER.
Since the master / child relationship doesn't seem to be possible with Navigation forms, I'm looking for the subform to filter on load.
User inputs a lot # in LOTNUMSELECT, then clicks on a tab. When the tab becomes current, the specific lot # (record) is showing.
I've been doing this from a "control panel" form opening another form with the following code.
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Decor"
If IsNull(LotNumberSelect.Value) = True Then
MsgBox "Please enter a lot number first."
Else
stLinkCriteria = "[Lot_Number]=" & "'" & Me![LotNumberSelect] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
I just don't know how to edit this to work with the Navigation form and subforms.
A navigation control has two parts. Navigation menu and a navigationsubform. Each navigation button (aka tab) will load a target form into the navigationsubform control. Only one form can be loaded into the navigationsubform at a time.
Since the navigationsubform opens your target form, you could use the standard "form_open" method to set your filter or set your recordset accordingly.
All you have to do, click on the forms open event and within that event you can access the parent controls simply by
dim lotno as long
Lotno = nz(me.Parent!controlname.value,0)
If lotno <> 0 the
' do your filter or recordset operation
End if
You can also use the form_load event. Since you are going to perform the filter after load, it is better to set it on the form_open. This will increase your performance.
PART2
I've had some more thoughts having done some experiments.
I don't think the navigation control is the right control to use for your situation. The navigation control does not seem to have events, and properties that will let you link it to a control on the main form that has the navigation control (which I think is what you are trying to do).
I think you will find it easier to use the "tab control", which is easier to work with in this case.
I think the navigation control is really designed to be a menu that allows you access other forms and reports inside it.
Here's a link to videos about using the tab control:
video 1
Video 2
Here's some links to videos about using the navigation control:
video 1
video 2
video 3
Here's some notes I made abut the navigation control:
The navigation control has a "navigation subform" which does not have any master/child data links fields. However, this subform is not a normal subform.
With the navigation control, you have to set the "Navigation target name" property of the navigation button (in the Navigation menu) to be the form you want to appear in the navigationsubform when the button is clicked.
Further more, the button has a property "Navigation Where clause" which I believe be used to set to filter the rows shown WHEN the form is loaded. There do not appear to be events that will allow you to change this filter when a control is used on the main form. .

Ms access form: field order

can I somehow set in what order the text fields become active after pressing the "Tab" button?
I think it depends on when you added the field and not where it is in the form. So can I change this or I should add the fields in the order I want to switch them with the "Tab" button?
Thanks!
There are at least a couple of ways to change tab order.
With the form in design view, right click on an area of the form without a control. On the context menu that appears, click on Tab Order. A dialog will open that will allow you to change the tab order.
Another method is via the property sheet for each control. On the Other tab there is a property for Tab Order. Just set it to whatever you like.

Display Additional Form on Update - RadGrid

I'm using a RadGrid for changing record status's. Users have the ability to select a status from a dropdown and update that record with that status. Depending on the status chosen, when the user clicks update I want to popup an additional form so the user can fill out more data required for the update. I'm not sure the best way to go about implementing this. Any suggestions are appreciated.
One way is to use the RadWindow like a modal and pop it up to the user via client-side JavaScript. We use RadWindows in our applications and it works. Or, the RadWindow supports a Nested Grid or View that you can have as a record's child; so you can have the master record, click on the arrow on the left and expand the record to view a nested grid of data, or a custom view (via the NestedViewTemplate property). You can also have the form in a DIV, hide it, then show it via JavaScript too.
Those are two ways.
HTH.