Saving unbound fields on form to table

lexygirl

New member
Local time
Today, 16:53
Joined
Jul 8, 2011
Messages
3
I am trying to save unbound fields to a table. I have the following forms

Enter payments
Fields - client number, first name, surname
Combo box - used to pick client.. I want the Enter payments form to be blank upon opening, I get this to work by putting in a filtering condition which can never be true, but then when I pick client off combo box no data is displayed… combo box is in form header

Bookings subform
Fields - booking id, b date, b resource, b type, b rate, b time slot, b cancelled, client id (FK)

Payments (pop up form)
Fields

Payment id auto number
Payment date default vale = date()
Sim duration entered by user
Payment amount =[sim-duration]*[text15]
Payment method drop down list
Client id =[Forms]![enter payments]![bookings subform].[Form]![client id]
Text 15 invisible field which holds the b rate from bookings sub form =[Forms]![Enter
Payments]![Bookings subform].[Form]![booking rate]

When I save the record payment amount and client id isn’t saved to the table. How do I get these values to be saved to the table payments… also when payment is saved for client, I want to be able to pass a value back to the bookings table (bookings subform) which I will add a field [booking paid for] Y/N so that clients with only bookings not paid for are listed in bookings subform.


Any help would be greatly appreciated…………
 
Your First Form Have Property Sheet, Data, Data Entry set to Yes and you should have a Blank Form.

Unbound text box control and use combo box to select the Client ID.

You can use Sub Forms to display Data on the client that may be required either for your re asurance or for Appending / Updating of a Table.
These sub forms are bound to a query or table and link master child to the main form.

Other text box controls on the main form allow you to populate them either by combo box, type yourself or default eg today's date but can be over typed.

You enter data etc and now wish to Process the Form ie Create a new record in a table or tables and or update an existing record.

With each text box control on either the main form or a subform you can reference the data held by same. Even if they are Unbound.
Ensure the text box control name is unique and not the same as the record source, if it is bound.

To update the record you can use Macro or VBA.

Macro will allow you to step through Append and Update Queries which will copy the text box control to the table.

VBA will allow you to either use SQL in your code or rst to update the records.

I can assist with any of these if required.

If you can paste a sample database with none sensitive data.

Check out help in your access as it may make sence to you.
 
Hi,

I set the form to data entry no and it opens blank, but when i pick my client via the combobox no data is displayed...

I am unableto attach my db something to do with security token error. Can you tell me your email address and i'll send you my db.

Many thanks
Lia
 
Your new form will accept the Client in the combo box but no other text box controls will populate ??

Or even the client can't be selected ?
 
can you open the attached database ? It has an example of a form with a combobox and other data populated referring to that combo box record.
 

Attachments

Users who are viewing this thread

Back
Top Bottom