Subform does not requery / Source is a linked table - subform

Setup: One Access database (database "A") contains all of the forms, queries, macros, etc. Two other Access databases (database "B" and "C"), each with the same collection of tables. The source for a subform in "A" is linked to a table in either "B" or "C". When I drop the linked tables in "B" and link to the tables in "C", refreshing the subform in "A" does not refresh the data from "C". If I close and then open the form, the data in "C" is displayed.
It's behaving as though the subform is not acknowledging that the linked table has been dropped and relinked.
Thoughts?

Figured it out! After the vba routine relinked the tables, I added code to change the "RecordSource" property of the subform, and it automatically refreshed the data from the newly relinked table without issuing a ".requery" command.

Related

Access: link between form and sub form

I'm working with a DB in which I created a form with subform coming from two tables (Primary Table: Attrezzatura; Secondary Table: Scadenziario. The link between the two tabele is One-to-Many).
In the form+subform I made a combobox for finding an Instument by code, so when I select one code in the main form,data of the primary table are shown (I enabled the possibility to modify the loaded fields) and contemporeanously a datasheet subform appear where I can add Last Control Date of the selected instrument (more than one can be added).
My point is this:
If at least one Last Control Date is inserted in the secondary table, I can see all the data from primary and secondary table
if I select a Code for which no Data have never been inserted in the secondary table, the main form does not show any information (I can't add the Last Control Date)
I would like to have the possibility to load also instrument (by code) for which the secondary table has not yet filled (I want to fill by the subform also for the first insertion).
How can I solve this?
Thanks

How to know in Talend if tMySQLInput will overwrite data?

I have one already existing Talend Open Studio tMySQLInput component with some sql code inside it, in order to retrieve some joined columns linked to a tMySQLOuput component (pointing to an already existing MySQL table) with few records.
QUESTION:
Will the "tMySQLInput" component overwrite the already existing table data that the tMySQLOutput component relates to? I mean is there an option to check in the tMySQLInput our output in order to say, overwrite each time this job is executed ?
Thank you all.
Yes, there is an option where in tMySQLOutput where you can specify what action you want to do to your table. Follow following steps:
Go to component tab of tMySQLOutput, it will open the basic settings of this component.
If you will look closer you will find Action on table. This is the action which you can perform on the table which is pointed by tMySQLOutput. It has options as Default, Drop and Create Table etc.
Then you have Action on data. These are the options which you can perform on the data like Insert, Update etc.
In your case I suppose you can choose Action on Table as Default and Action on Data as Insert. Default action would not do anything on the table and Insert option would insert the records at the end of table. But in case of Insert if you will have duplicate rows then job would stop the moment it will find any duplicate row.

ms access unbound datasheet or alternative control

I want to have an unbound datasheet control in ms access forms or any other alternative tabular data showing control, where I can add rows dynamically and save it to database on form submission not on each next row.
I tried bound datasheet but it saves records as new rows is created, is there some property or method which prevent record saving automatically.
or any other alternative.
below is snap (red portion is not created, I want like this).
actually I want to save order
which has child table order_details
for order details I want this control
No, the records have to exist somewhere.
Use a temp table where you create 10 or so empty records before opening the form, and delete all records when you close the form.

Access 2010 - Parent and child forms share the same table

I'm writing a budget database, and while planning out the tables went fine, forms are proving to be trickier.
I have a 'transactions' table, and two queries based off it. The tables and column names are below
'people_to_reimburse' : payee_name, total
'unwritten_checks' : payee_name, amount, description, date_incurred
I'd like to make a form where you can go through the people to reimburse, and there's a subform showing which checks are theirs. Obviously, the payee_name would be the field to link on.
However, in Access's Form Wizard, when I select these two tables, I get an error of:
You have chosen fields from record sources which the wizard can't connect. You may have chosen fields from a table and from a query based on that table.
How would I set up a form like this, if it's possible? If not, why can't I?

Cannot edit data in MS Access form, it says "Recordset is not updatable"

I have a form, that holds a subform which displays data from a simple query based on the content in a input field.
I have set the properties of both forms to the following, but I still experience the "Recordset is not updatable" message.
Recordset type: Dynaset
Allow Additions: Yes
Allow Deletions: Yes
Allow Edits: Yes
Allow Filters: Yes
Record Locks: No Locks
What to change?
Perhaps one of the tables or queries that your query links to do not have Primary Keys.
OR (and this was the problem I had)
In the Query Builder, make sure the Group By row is not enabled. When you disable this then the query will become editable.
Group By Enabled
Right-click on the row and disbable Totals
Group By disabled
This page has some good info for troubleshooting.
Make Text0 unbound (remove Navn as the Control source). You have what amounts to a circular reference.
You're telling the form not to show any data except what is limited by the query, but you're having the query not show any data except what is in your form.
I ran into this issue and it was due to relationships between the tables. I had a few set as Indeterminate and believe this was causing the issue. Once I modified my table relationships so that all were One-to-Many, I was able to edit fields in the query/form.
-Note that to have a one-to-many relationship, one field in the relationship must be a key or set to Unique.
I encountered this error with a Access 2016 form created with the form wizard.
It set some variables like Data Entry to No.
But what locked the form from edits was the filter and sort.
I had to tell both the filter and sort 'No'
When I reopened the form nothing was showing.
I filtered on something then cleared filters.
Now the form is working.
In my case I made a table where I joined the possible combination mixes from various other tables with a number of corresponding many-to-one relations. In the subsequent query using just this one combination table it became unupdateable if I checked the "Unique Values" in the query's property sheet. It works ok checking the "Unique Records".
The downside is that when filtering on one of the combination fields in the query I now get all those lines (records) from the combination table where this particular field has got the filter value. I wouldn't get that if I checked the "Unique Values".
I guess the solution is to make two separate queries: one unupdateable for just querying and then a copy query (except for unchecking "Unique Values" when updating is required).
At least you get your relationships right.
corrupted tables can sometimes lose their primary keys and that could be the cause of "Recordset is not updatable" message.
I found the same issue with a recordset not updatable but it seemed intermittent. The subform recordset was updatable, then it was not. When it was not updatable, I had to go back to an early copy of the database. In the earlier copy, the recordset was updatable. What I found was that if I sorted the subform data and closed the form, access saved the "Order by" clause in the subform properties - I never ran any command to save the subform. With this "Order by" set, the subform recordset was not updatable. The Fix: I added an initialize routine to all subforms to remove the order by, before the main form is opened. Wala! Recordset of subform is now updatable every time.
Above Allow Additions: Yes you should have something like
Allow datainput. Make sure this field is set to false. If you read the status bar comment when you have this field selected you will understand why your table suddenly became unediteable from your formular :)