Control Source assistance

User avatar
Michael Abrams
4StarLounger
Posts: 574
Joined: 10 Feb 2010, 17:32

Control Source assistance

Post by Michael Abrams »

20 years doing this and I still get brain fog.

Table
tbl_Transactions

Fields
Initials
OKs
Total_Transactions

Transactions_Form (Record Source = tbl Transactions)
Fields
txtInitials Control Source: Initials
txtOKs Control Source: OKs
txtTOTAL_TRANSACTIONS Control Source: =([txtINITIALS]+[txtOKs]) does not work with or without parentheses

I could swear this worked on previous databases, but I must be missing something this time.

Can you please assist?

Thank you so much !

Michael

User avatar
HansV
Administrator
Posts: 78513
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Control Source assistance

Post by HansV »

Have you tried

=[Initials]+[OKs]
Best wishes,
Hans

User avatar
Michael Abrams
4StarLounger
Posts: 574
Joined: 10 Feb 2010, 17:32

Re: Control Source assistance

Post by Michael Abrams »

:sad: It did not work

Once again, I may have left a piece out. I hate when I do that.

The math works on the form, but it does not save the total in the tbl_Transactions: field Total_Transactions.

User avatar
HansV
Administrator
Posts: 78513
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Control Source assistance

Post by HansV »

Ah wait. You should not store the total in the table, since it is a derived value. Delete the Total_Transactions field from the table.
To display or use the total elsewhere, create a query based on tbl_Transactions:

SELECT Initials, OKs, [Initials]+[OKs] AS Total_Transactions
FROM tbl_Transactions

You can use the query as record source for forms and reports.
Best wishes,
Hans

User avatar
Michael Abrams
4StarLounger
Posts: 574
Joined: 10 Feb 2010, 17:32

Re: Control Source assistance

Post by Michael Abrams »

Sounds good.
Much appreciated HansV.

Michael