Tab through subform (1 Viewer)

ClaraBarton

Registered User.
Local time
Yesterday, 19:17
Joined
Oct 14, 2019
Messages
605
The only tab fields on the 2nd subform below (Invoices) are Received, Date Rec'd, and Check #.
When I add a new invoice I want to jump to the 3rd subform, Description and Amount. After entering the amount on the first item the tab moves back to Received in the 2nd subform. I want to continue adding items until I add a new Invoice. In other words, tab from Amount back to description on a new line. It seems intuitive but I can't seem to get it to work.
1727910022517.png
 
Is the Tab Cycle property set to All Records? Also, is the Allow Additions property set to Yes?
 
yes
 
tabbing through the invoice form (sub 2) goes line to line. jumping to the invoice detail jumps back to invoice... line to line. Never wants to go to detail unless I mouse down. I've also tried this and can't get it to work (last line):
Code:
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("Select * from tblInvoice")
    With rst
        .AddNew
        !fNameID = Me.NameID
        !InvoiceNo = DMax("InvoiceNo", "tblInvoice") + 1
        .Update
        .Close
    End With

Set rst = Nothing
Me.Recordset.Requery
Me.sfcInvoices.Form.sfcInvoiceDetail.SetFocus
The only time I want to be in sfcInvoices is when I receive payment. I want to jump right to details.
 
Are there any code behind the second subform that might be sending the cursor to the first subform?
 
Can you post a sample db to demonstrate the described behavior?
 
Thanks! Just as a quick experiment, download the file you just posted. Don't unblock it and open it from your Downloads folder. When the form opens, click into the Description field with "Test" in it and then hit the Tab key. The cursor should go and highlight the Amount of 2.00. Hit the Tab key one more time and see where the cursor goes. Is that where you wanted it to go in the first place?
 
Okay, the above post was a test before unblocking the file. After I unblocked the file, I was expecting it to behave the way you described. But to my surprise, it worked as expected instead. When I Tab out of the Amount box, the cursor went to the Description box for a new record. Are you saying that's not what's happening with your original database file?
 
No. I want it to go back to description after amount. Continually adding details. I also want it to start in Description when I add a new invoice.
It goes to received. Unless there's a second record. Then it cycles through the records. It will not cycle to a new record.
 
No. I want it to go back to description after amount. Continually adding details. I also want it to start in Description when I add a new invoice.
It goes to received. Unless there's a second record. Then it cycles through the records. It will not cycle to a new record.
Did you do exactly what I said? "Download the file you attached to your post." That's the file I am using. When I tabbed out of the Amount, it goes to the Description next, which is what I think you said what you want to happen right?

I'll have to check the other issues you mentioned regarding a new invoice and going to the received box. How would I add a new invoice? When I click on the "Add New Invoice" button, I am not sure I understand what is happening by just looking at it. When I click that button, the cursor stays on that button; and when I hit the tab key, it goes to memo box.
 
New invoice adds a new date and invoice number then it should go to detail (Description). I did exactly as you said. Tab after amount jumps up to Received. UNLESS there is another record in the detail. It cycles through established records. It will not add a new record (or item line)
 
I always thought I was lucid! You force me to rewrite and rewrite!;):)
 
I Did! I Did! Exactly. Does not go from Amount to Description. On the one I posted and Downloaded and tried again. I Did!
 
I Did! I Did! Exactly. Does not go from Amount to Description. On the one I posted and Downloaded and tried again. I Did!
When you downloaded the file and tried to open it, did it ask you to unblock it? If not, perhaps Access remembered that the file came from your computer.

But no matter, when I unblocked my copy, the cursor went from Amount to Description on a new line. So, perhaps you're right that it may be something with your setup. Perhaps you could try a different computer?
 
  1. You placed a subform in the Footer Section of a form which caused the Tab function not to work, so you could not Tab to the form. I moved the subform to the Detail Section so you can Tab to the subform.
  2. You placed a Me.Parent.Requery command in the After Update Event of the fsubCustomer subform. That was causing the cursor to automatically go to the first record again after you input the Amount. I commented out the line of code and now it works as you wish.
Here is your file back
 

Attachments

Users who are viewing this thread

Back
Top Bottom