Help with updating a subform

chris_jolly

Registered User.
Local time
Today, 15:12
Joined
Jul 27, 2007
Messages
24
Hey guys

New to access and new to this forum. Here's my first post.

Im currently working on a database that will assist people at work with inputs into our Optimizer. The goal of the database is to allow the user to input their forecast for a particular material and have the data stored in spreadsheet form.

**The intention is to make this as user friendly as possible, most users are not that computer savy**

Layout: I have 2 combo boxes and a text box on the main form that I am using to populate the subform (which contains the table that I want to populate). I also have 3 command buttons.

Problem: I have the combo boxes and the text box populating 3 fields in the main table through a control source relationship. It seems to be working fine, however, I have a button called "Input New Forecast". This buttons intention is to create a new record both in the main form and the subform. Essentially its there to create space for the new forecast. Im having trouble adding the new record to both forms and refreshing the data. Everytime I change all the data in the combo boxes and text box, and then hit the "Input New Forecast" button I need to close down the program to notice any changes.

I have tried using a requery macro as well as other things.

My main question is how do I add the new record to both the main form and the subform so that it will continuously update the data once I hit the button. Also, Im not sure if the way I have the database organized is even correct.


Please bear with me, I dont fully understand the proper lingo, etc. but I will try to help out as much as possible, just shoot questions my way
 
Chris:
- Welcome to the forum.
- It seems unusual to add to the main and the subform at the same time. The best example is a Purchase Order. First you create the order, then you add detail records, the items to be purchased. There are exceptions, but...
- Though you can use subforms other ways, the easiest is if your tables have this type of one-to-many relationship. One record in the main form bound to a "main table," and many records in the subform bound to a "details table."
- If your tables are related this way, and your forms agree, there's little need then to have a button to "create space." Users should be able to <PgDn> to a blank record and start typing or selecting from combos directly.
 

Users who are viewing this thread

Back
Top Bottom