Return an empty register

ClaraBarton

Registered User.
Local time
Today, 13:52
Joined
Oct 14, 2019
Messages
623
I have a form of accounts and a subform register of transactions.
Clicking on a transaction opens a form to edit current transaction or create a new one.
If the account has no transactions, it does not return an account ID or the name of the account.
If I've created a new account, the register is empty and I'd like to add new transactions.
How do I return an empty register with the account name?
 
No idea without knowing your tables and relationships and the form and code you are using for this particular process

Best guess would be to create a dummy record which can subsequently be deleted

Something like

If dcount(*, sometable, accountid=something) =0 then create a record
 
Is the subform's Allow Additions property set to No by chance?
 
Click on split to open the edit menu. I can't figure how to send a valid account number to add a new transaction
 

Attachments

looks to me like the issue is qry1 - it is based on transactions as the 'primary' table to return - no transactions, no records. Not completely clear to me why you need this structure - perhaps change the join between account and transaction around
 
Are you sure you don't mean Me.NameID instead of Me.Name? You aren't using a Where clause so How does the popup form know what payee you want and what check?
 
You were right that I had my relationship wrong. I needed all account records and matching transactions. The popup refers to the register and when it didn't have records it didn't have an account. Got it fixed and thank you very much.
 

Users who are viewing this thread

Back
Top Bottom