MS Access question part II

   / MS Access question part II #1  

Richard

Super Member
Joined
Apr 6, 2000
Messages
5,001
Location
Knoxville, TN
Tractor
International 1066 Full sized JCB Loader/Backhoe and a John Deere 430 to mow with
I've created a (very rudimentary) database.

I used a single table, multiple forms and have only 1 (3 page) report.

What happens is.. my file works exactly like I expected it to, until I put in a second record.

When the file initially opens, there is a main form with the control buttons to open additional forms as needed. When the additional forms are opened, the only way out of them is to close them & return back to main form.

ok.. problem, issue

I hit "add record" and the main form clears out ready for more input. I put the data in, hit the first button to start inputing on the SECOND form... yet, the data from the FIRST record is still showing (the relevant fields that show on this form, not data from main page)

I go back to my main page and can scroll back/forth between THOSE fields of the records, but it seems, as soon as I move onto another form, the "default" view is that of the FIRST record, and not "blank" for the addittional, new record.

In case I've been unclear, I'll try another way of putting it. When I'm on the first (main) page, it shows record 1 of 2 and I can select between the 2 records by scrolling my wheel, or clicking on the arrows I put in. When I hit the button to move to another form, it defaults to record 1 even though I'm WORKING on record 2, as such, it makes me over-write the data of record 1 and mixes it all up.

I can scroll to record 2 and input the data onto the correct record, however, I'm making this for a friend and quite frankly, I don't like the idea of each time anyone moves to another form, they have to scroll around to be sure they are on the correct record for data input. Can they be "bound" together, such that they scroll in unison?

Any thoughts?

I'm about ready to make a query & redirect all the fields on the report to the query, rather than to the table. I made all point to the table because this is (so I thought) such a simple thing.

Although I must admit Access is frustrating to me, I'm hard headed enough & bull headed enough that I DO love a challange and somehow, will overcome this issue! /forums/images/graemlins/grin.gif
 
   / MS Access question part II
  • Thread Starter
#3  
I think the prior issue was with printing current report, verses trying to spew out ALL files?

/forums/images/graemlins/confused.gif

I'll go back & look to see if this was addressed
/forums/images/graemlins/blush.gif
 
   / MS Access question part II
  • Thread Starter
#4  
it was related to printing & this wasn't brought up. In fact, it was brought up to ME only today.

If I wasn't so dang hard headed, I'd toss this out... lol but I love a challange and will bang my head into oblivian until I get it working (though that may not be the same as "figured out")

/forums/images/graemlins/tongue.gif
 
   / MS Access question part II #5  
I'll take a stab at this. My main expertise is Visual Basic and SQL and I don't usually work with Access forms just the data in tables. However, what you want to do is possible BUT it will require some VBA code in both your forms and a code module. Your data table will also need to have a unique record number field (ie. set as AutoNumber) so each form can correctly query to get the record you want to display. The code module will contain a public variable that tells the forms what record to load. Your main form will be responsible for keeping this variable updated.

That's just for starters. The nice thing about Visual Basic and its little sister VBA is that there is always 3 or 4 ways to get the job done. There may be a better way but it will still require coding.

Questions? PM me.
 
   / MS Access question part II #6  
Let me repeat a couple items to be sure I understand:

1) There is only one table
2) There is one main form and other "children" forms which all update the same table. These other "children" forms were created to create groupings of similiar data.

If the above is true, try the following:

1) Make sure you have a unique id for each record in the data table - it is easiest to use an auto number field for this
2) Use the table for the record source for the main form
3) Add a text box to the main form that contains the unique id - you can set the "visible" property of this textbox to "No" so it will not appear to the end user
4) Create a simple query on the table that includes all the fields. This query needs to have a criteria that looks to the value of the text box on the main form.
5) Set the record source on the "children" forms to be this query.

I may have missed a step so let me know if this does not work. Its just one of 6 ways this could be addressed.
 
   / MS Access question part II
  • Thread Starter
#7  
</font><font color="blue" class="small">( Let me repeat a couple items to be sure I understand:

1) There is only one table (correct)
2) There is one main form and other "children" forms which all update the same table. These other "children" forms were created to create groupings of similiar data. correct, and I like the perspective of term "children", makes it clear

If the above is true, try the following:

1) Make sure you have a unique id for each record in the data table - it is easiest to use an auto number field for this done
2) Use the table for the record source for the main form done, in fact, table is source for all forms and the report, however, I'm now tinkering with remaking report using a query
3) Add a text box to the main form that contains the unique id - you can set the "visible" property of this textbox to "No" so it will not appear to the end user hmm... ok? reading on....
4) Create a simple query on the table that includes all the fields. This query needs to have a criteria that looks to the value of the text box on the main form. as in item 3? hmm... (off to investigate)
5) Set the record source on the "children" forms to be this query. interesting...

I may have missed a step so let me know if this does not work. Its just one of 6 ways this could be addressed. )</font>


Thanks for the step by step... will start playing immediately.
 

Tractor & Equipment Auctions

GENERATOR (A53843)
GENERATOR (A53843)
DUMP HOPPER (A53843)
DUMP HOPPER (A53843)
2012 DOOSAN G25 GENERATOR (A53843)
2012 DOOSAN G25...
RIDGID POWER DRIVE/HAND HELD THREADER (A53843)
RIDGID POWER...
WOOD GRABBER FOR MINI EXCAVATOR (A53843)
WOOD GRABBER FOR...
2016 Autocar Xpeditor T/A New Way Side Loader Garbage Truck (A54814)
2016 Autocar...
 
Top