Full Version: Subform entry issues
UtterAccess Forums > Microsoft® Access > Access Forms
gkmros
I have created a subform for adding parts to a service workorder. This subform was created in Datasheet view so that the user could have a row of information for each part used. The first field is a combo box where the user can select the part by part number. Once they select the part it populates the rest of the row except for the quantity used. My problem occurs at this stage, if I have a lot of parts already entered and there are a lot of rows on the subform, and I want to add more parts with quantities greater than 1 I have to keep scrolling down to the bottom of the list and add the quantity. Once I select a new part the row populates and jumps the cursor up to the very first row. This becomes very tedious for the user, especially when they have 20 or 30 parts to add.
Is there a way of keeping the pointer in the row after the part has been selected? And then move to the next blank row after the quantity has been entered?
Aquadevel
gk,
had the same issue with a client.
What you have to do is put that subform with the combo box above the existing one, and make the combo box on the lower one just a normal control. The lower subform will just be a 'view' window.
If you sort the lower subform with the PK decending, then the last entered item will be on the top of the list.
Freak gave me a great link to use/follow, but I'm on a at a different location and don't have access to it.
You may search the code forum for 'continous forms' and find some help.
gQQd luck.
Aqua
Jack Cowley
Set the forms Cycle property (under the Other tab) to Current Record. Be sure you do not have code in the On Exit or On Lost Focus of the control that you fill in last that causes the cursor to go to the first record.
th,
Jack
Aquadevel
Thanks, Jack. frown.gif
qua
Jack Cowley
Aqua -
I am not sure that my answer is correct, but was my best guess to a possible solution. You may be the one with the answer the member needs!
Jack
gkmros
I tried your solution Jack but the cursor still jumps back to the first record. I even set the quantity field as Required, but it made no difference.
considered changing the PK to descending order as well but I am not sure the customer will go for that.
I will do a search on the "continuous forms" as you suggest.
Thanks guys!
Jack Cowley
Is the datasheet bigger than the 'window' it sits in so that you do not see the new record at the bottom of the list? Are you sure you have no code in the On Current event of the subform, or other code that sends, the curor to the first record? Does this happen if you edit a record anywhere in the subform or does the cursor stay in the record you just edited?
hanging the PK will not result in the top record being the new record as the new record is always at the end. And in my humble opinion Continuous Forms are difficult to deal with...
Jack
Jack Cowley
Another question... What happens when you place the cursor in a row in the subform and use the tab key repeatedly?
ack
Aquadevel
gk,
found the example Freak posted to me when i had the issue you are having.
Its attached, you will have to modify it, but it will do what you want. frown.gif
gQQd luck,
Aqua
Aquadevel
Just to clear up what I meant.
My sorting with the PK #, in decending orderon the lower subform will have the last entered item on the top of the list.
I have to agree using continous forms can give you more grey hair, until you play with them a while. frown.gif
Gk,
I just found the info and attached to an additional post.
gQQd luck,
Aqua
Aquadevel
Jack.
Changing the PK will not result in the top record being the new record as the new record is always at the end. "
Thats the reason I had to modify my main form that had 1 subform to a main form with 2 subforms. The 1st subform has the combo box for entering the data, and is only 1 row high. The 2nd subform is just a 'view form' in continous form which displays the data entered and is sorted by the PK # decending so that the last item entered is on the top of the list.
Just clarifying info. frown.gif
Aqua
Jack Cowley
Aqua -
otcha!
Jack
Aquadevel
"Another question... What happens when you place the cursor in a row in the subform and use the tab key repeatedly?"
'd like the answer also. frown.gif
Aqua
gkmros
I placed the cursor in the first field, which is actually the combo box part number field. Then I hit the tab key and it moved to the next field in the row, and then the next, and next, until it came to the last field and then moved out of the subform and back onto the main form. (I have attached a screen capture of the subform for reference.)
qua, I am intrigued by your solution with the two subforms. It may just work. I will see if I can adapt it to my application.
Thanks guys!
Gerry
Aquadevel
Gerry,
its what I had to do for a client. I've attached a screen shot of 1 of the forms with 2 sub's on it.
gQQd luck,
Aqua
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.