Detail section of an MS Access form needs to allow access to all table records one at a time - ms-access-2007

I have a MS Access form with a subform on it. Opened on its own, the subform can run a "Find Record" action to pull any record from the single table that supplies data to it. As a child placed in the detail section of another form, however, it looks like the subform is "bound" to a single record that is selected on another control in the detail section (the other control is located outside the subform). Is there any way to "detach" the subform's dependency on the record that is current for the detail section, and allow the subform to select from a full set of records?

Related

Which form event to use to update a form once form has loaded

A text box on my MS Access form needs to display a value once someone enters information onto the other fields in the form. The text box has a control source from a table so once someone enters information into the other fields, the set box should display the from the table it is linked to. So essentially, I entering the information into the other fields locates the record and field that my textbook should display.
Should I add an event procedure to the Form_Load event? or do I add an event procedure to the txtbpx_AfterUpdate event in order to display the value of the textbook?
I am new to using MS access forms so please answer while keeping in mind that I am a new user of MS Access form.

Ms access database is updated when the subform on Mainform is updated via vba

I have very strange problem I am working with MS access 2013 a application called "failure Analysis system" through which user can enter a different data for different system.
I have cread a main form to enter a data lets say "Tb_Mainform" and in this Mainform I have also one subform called "tb_subform". whenever user change one combox in Mainform the subform is updated using
Me.tb_suform.form.recordsoure = query
Me.tb_subform.requery
until now everything is gud subform is also updated. when i click on subform to navigate, it updated the table with half unfilled data.
How can i prevent this. I am opening the main form by using
DoCmd.OpenForm "tb_Mainform", WindowMode:=acDialog, DataMode:=acFormAdd, OpenArgs:=C_ID
PS: Main form and subform using the same database table.
Below is the link with the same problem as mine. it is 6 year old post but i think after that something has to be change in Access until now.
How do I prevent clicks on a subform causing updates on the main form
I have created an unbound form. It contain subforom where I am saving the records manually in vba.
comment by ChrisPadgham helped me a lot

Trouble with SetFocus property and SubForms in Access

I have a MainForm with 4 other subforms on it. These subforms are visible and invisible based on user selection on the main form. The visible/invisible works like a charm but I am having trouble with setting the focus on these subforms. what I am doing:
on change event of a combobox makes a subform visible, then I wanted to set my focus on that form but I kept getting the runtime 2110 error. I noticed this was because all the fields on my main form are required fields and access could not transfer the focus unless these fields were filled up (setfocus worked when all the fields were filled in the main form). Now to fill up all the fields before going to the subform is counterintuitive because its not how the data to be entered will be flowing.
So my question is ----- How do I let my focus transfer to my subform before having to fill out all the required fields in the mainform!?
All help is highly appreciated as always! thanks!
IMHO that is not possible if the main form is bound to a recordsource. Whenever Access moves the focus away from a form it's default behaviour is to save the changes if there are any. It will therefore always want a valid record (i.e. no changes or valid changes).
If the subform record has a recordsource with a foreign key relationship to the recordsource of the main form you will also need the PK of the main form to have been created - which usually is a serial generated on save. If you do not have a record, you do not have an PK to pass on as FK.
Alas, if there is NO relationship between the main form and the subforms (i.e. you don't need the PK), a possibility would be to make the main form unbound and save it's contents via a button click in order to allow users to enter half of the data before switching to the subforms.
Of course you would have to handle the case of users inserting data in the subforms and then not finishing the fields on the main form.

Ms Access 2007 ComboBox

I am using Access for a quick and dirty (ADP) interface for an SQL (Express 2012) database so data entry can begin before the MVC web app interface is complete.
There is one field I want to be varchar, I would like this field to either allow the user to type in a value or select from a distinct list of values previously used in that field.
I have that part down, but the problem is when it happens, I have to refresh the recordset to see the new item in the list, so if they choose add a new record, then the last item added is not visible in the list.
So I can get the distinct list, populate the box, allow for new entry, and save that to the DB, do I have to write a code behind to repopulate the recordset, do I need to write a code behind to maintain the list paralleled to the recordset, or is there just a property I am missing?
Thanks
(Added screen showing event)
As suggested, using the on current event on the form and the after update solved the problem.
Clicking the form section detail selected the detail sections property page not the form. Selecting the form from the drop down on the property page displayed the events I was suggested to use.
Many thanks to those contributing.
As the first suggestion of this was from Remau, with assist in locating that event from hansup, I will mark remau's post as answer. Thank you to both.
Don't requery the form, just requery the combo. The best bet is probably the current event which will work if more than one person is doing data entry. It will also work if people are editing the table as well as entering data. Events that only fire when a record is added will not pick up changes to the combo contents.
Private Sub Form_Current()
Me.MyCombo.Requery
End Sub

Access forms and sub-forms

I am building a database on MS 2003. I have one form which calls for a series of options. This form is based on the table "Categories" which is linked to the main table by Customer ID.
Now, both forms appear together on the same screen, what I am trying to do is have the person select one or more of the categories and in pressing a command button then those categories which were selected will show its respective forms. The forms are invisible until selected and until the command button is pressed.
Since they are two different forms (categories in one) and the entry form on another, How do I program the command button to make the entry form visible FROM the other form?
The sub-form is located in a tab. I dont want to show it as a pop-up but to become visible within the tab where it's located
If the form is open but invisible then you can refer to it as a member of the forms collection and make it visible:
forms("myForm").Visible = true
If the form isn't open then get its name from the AllForms collection of the project and then use the OpenForm method:
docmd.OpenForm currentproject.AllForms("myForm").Name, acNormal
Pseudologic: you are basically going to want to set the Visible property with all of your forms to False during the form's Open event. You should place this Visible = False code in a separate subroutine so that the code structure can be called during other events too. (For example you may want to provide a Reset button so that the user can reset the form, or trigger the "set false" code when a new customer id is selected.) Then with every selected category you would set its associated form property visible by setting Visible = True.