Form data to table issue

Bandara

Member
Local time
Today, 08:43
Joined
Apr 17, 2020
Messages
60
I have table and and i generate form from that table. There is a Field called Spare Parts and Control source is selected as Spare Parts. But I want to make =[USE SPAREPARTS].[Form]![Text41] to that control source. if i eter this the data not store in the table. any one know how to fix it
 
what is [USE SPAREPARTS]? a form?
i don't understand the requirement.
you can try adding an Unbound textbox to your form.
on the unbound textbox controlsource:

=[Forms]![USE SPAREPARTS]![Text41]
 
what is [USE SPAREPARTS]? a form?
i don't understand the requirement.
you can try adding an Unbound textbox to your form.
on the unbound textbox controlsource:

=[Forms]![USE SPAREPARTS]![Text41]
What i am asking is if i remove the table field in Control source and add a expression to it. How can i submit that value to table.
 
you can Open a Query and update your table with the value.
if the value is already saved on another table, then you don't need to
save it again (reduntant/ not normalized).
 
you can Open a Query and update your table with the value.
if the value is already saved on another table, then you don't need to
save it again (reduntant/ not normalized).
IF I RUN A UPDATE QUERY ON FORM WHICH ENABLED DATASHEET VIEW. QUERY DIDN'T GET DATA FROM THE FORM FIELDS AND POP UP TO ENTER DATA TO RUN QUERY WHY?
 
what is the SQL of your update query?
what version of ms access do you have?
 
Further to arnelgp's request, readers need more info to help put your posts into context. Code related to your form and query or a copy of the database would be helpful.
Can you tell us in plain, simple English (no database jargon) - what are you trying to accomplish?
I'm attempting to get you to describe the "business issue" underlying your request.
 
What i am asking is if i remove the table field in Control source and add a expression to it. How can i submit that value to table.

You are asking about using an unbound field but storing the result. Yes, this is possible but doing this is making more work for yourself and it also avoids the primary strength of Access - to automatically store items bound to a form.

I believe there is a misunderstanding here, but I haven't identified its nature yet. So... let's say that you want this. OK, acknowledged, it is what you want and I assure you it is possible. But WHY do you want to do it this particular way, which we see as unusual?

What we see is this: You could leave this as a field bound to a control and simply enter a new, different value in that control. That new value would be saved with the rest of the record when you save the form's current record anyway.

You want to do something other than the normal Access style of doing things, so you must have a reason as to WHY you wish to do it this way. Can you explain that reason to us? Because right now we don't see why you want to go out of your way to do something that Access normally does anyway.
 
hI THIS IS ANOTHER ISSUE IN FORM DATA SHHET VIEW. IF I SELECT VALUE FROM DATASHEET VIEW DROPDOWN THE ID IS GOING TO SECONDS 3RD ROW ALSO
1641927449974.png
 
What i am asking is if i remove the table field in Control source and add a expression to it. How can i submit that value to table.
If I've understood you correctly, in the main form before update event put something like

myfield=[USE SPAREPARTS].[Form]![Text41]

This assumes text41 is the name of a control on a subform to the main form.

If I've guessed correctly (I'm assuming text41 is the name of a control summing or counting a value) then I have to say that storing calculated values of this nature is a bad idea.
 
what is the SQL of your update query?
what version of ms access do you have?
Hi

I add form with datasheet view to another form. and add this code (Marco applyfiltrer) to search data on table through form.

[ACT ID] Like "*" & [Form]![MAINTENANCE COST]![Combo54] & "*"

It worked perfectly in form view. Then I add thiss code with my sub form. The subform is in datasheet mode
[ACT ID] Like "*" & [Form]![MAINTENANCE COST]!USE SPAREPARTS].[Form]![Combo54] & "*"

This doesent work.
 
Hi

I add form with datasheet view to another form. and add this code (Marco applyfiltrer) to search data on table through form.

[ACT ID] Like "*" & [Form]![MAINTENANCE COST]![Combo54] & "*"

It worked perfectly in form view. Then I add thiss code with my sub form. The subform is in datasheet mode
[ACT ID] Like "*" & [Form]![MAINTENANCE COST]!USE SPAREPARTS].[Form]![Combo54] & "*"

This doesent work.
 
what is [USE SPAREPARTS]? is it a subform or another form?
you try all possible combi (maybe you'll win the lotto):


[ACT ID] Like "*" & [Forms]![MAINTENANCE COST]![USE SPAREPARTS].Form![Combo54] & "*"
 
what is [USE SPAREPARTS]? is it a subform or another form?
you try all possible combi (maybe you'll win the lotto):


[ACT ID] Like "*" & [Forms]![MAINTENANCE COST]![USE SPAREPARTS].Form![Combo54] & "*"
Main form is Maintenance cost
Use spare Part is another form but i added as a sub form of maintenance cost on datasheet view mode.
 
There is table called ProductCost. I want to get All products Total Product Cost to a Form field. Form is not connected with table. How to do that
 
what is [USE SPAREPARTS]? is it a subform or another form?
you try all possible combi (maybe you'll win the lotto):


[ACT ID] Like "*" & [Forms]![MAINTENANCE COST]![USE SPAREPARTS].Form![Combo54] & "*"
There is table called ProductCost. I want to get All products Total Product Cost to a Form field. Form is not connected with table. How to do that
 

Users who are viewing this thread

Back
Top Bottom