Form to enter data

john_gringo

Registered User.
Local time
Today, 14:33
Joined
Nov 1, 2011
Messages
87
Hi I need to build a form with a subform to collect data and save them with a "save button" into two tables, else not (do not save the data if the "save button" won't pressed)

Thanks Jiannis
 
Yes, it is possible, but it is better to show it on your specific example.

Can you post a copy of your application with just the form (with subforms) and required tables/queries.
Just a few (fictitious) records to understand.
 
Hi I need to build a form with a subform to collect data and save them with a "save button" into two tables, else not (do not save the data if the "save button" won't pressed)

Thanks Jiannis
The work flow described sounds like you want unbound forms, not the default bound forms Access preferentially uses. Unless there is a compelling reason to go down that path, though, bound forms are sort of like cheese pizza, the basic, classic variety on which all else builds.
 
When you have a parent child relationship, the parent record MUST be saved before you can save any child records. Rather than using unbound forms, a common solution is to use "shadow" tables where you build the transaction and validate it and only then transfer it to the production table. You run the final process inside a transaction. Use DAO to add the parent record so you can pick up the PK, then run an append query to append the child records. Delete the data from the shadow tables when you are done.

This bloats the database so you might want to look at options for template BE's that just hold the temp tables
 
This is one of those "If you have to ask its beyond your capabilities" questions. What you want to do is possible, but you really need experience with a lot of aspects of Access to achieve it. How good are you at VBA?

My first suggestion is to really consider if this is necessary. What do you think this is going to help you achieve and is that really true? You are essentially adding a confirmation step to the input process and nobody pays attention to those. Especially if that confirmation step is always part of the input process, people are going to input their data and automatically click that "Save" button no matter what without thinking it through because that's what they train themselves to do.

Think of a web page that has a popup that you must click through to "Accept All Cookes"--nobody realy pays attention to them, they just click to get that damn popup out of the way. That is what you will be creating with this "Save" functio---a mindless click event users automatically go thru.

Now, if you still want to do this then google "Unbound Form Access" the first 3 results I found where all very helpful in achieving that type of system.
 
Paul said what I didn't want to say. There are better options than unbound forms and shadow tables. The only time I have ever needed to do this was for a payment application where the payment had to be allocated to multiple open items. So the user needed to choose dollar amounts (or balance) until the check was fully distributed. Only then was the transaction complete. The key here is that the user didn't tell me the application was complete, validation rules told me.

If you tell us the problem having incomplete records will cause, we will offer solutions that are less painful to code.
 
I am not an expert....have some VBA skills.....just a few...I need to build a DB in access for my Storage Warehouse but can't find someone to do the job locally.
Anyone who wants to involve will be paid. Am I allowed to ask this here?
 
Anyone who wants to involve will be paid. Am I allowed to ask this here?
solving your problem may take time and more than 1000 lines of code, but you have not shown anything for reflection and advice.
 
Sorry, I'm working on it......it's a day off today here in Greece.....:)
I will post my project later today........thanks for your kind support
 
Here is my DB
I assume I have to go through recordsets.!!!!!!
As soon as I press the save button it should create a new order record in tblOrders and then use the order number to add new records to TblOrderDetails and empty the table OrderTemp
 

Attachments

Why do you think you need to do this? Specifically, why do you think the standard bound form method won't work for you?
 
I don't want to save the data instantly (if I'm right), I need to have the option to cancel the order or the invoice. With the bound method, as soon as I enter data in the form, they are stored in the table, something I want to avoid.
I am sure there are several, easier and maybe more efficient ways to do it but I am not an expert and I am choosing the easiest way for me.
:)
 
Hi I need to build a form with a subform to collect data and save them with a "save button" into two tables, else not (do not save the data if the "save button" won't pressed)
Only for adding new entries for now ...
 

Attachments

Users who are viewing this thread

Back
Top Bottom