I removed the CkAmount from qryTransactions. If I remove the Sum from Cleared It says Does not include as a part of an Aggregated function. The only thing it will accept is sum. There are not 2 ID's 19. It is an autonumber.
SELECT qryTransactions.TransactionID,
qryTransactions.Cleared,
Nz(-[Credit],0)+Nz([debit],0) AS CkAmount,
-Nz([CatCredit],0)+Nz([CatDebit],0) AS CatAmount,
qryTransfers.TAmount,
Sum(IIf([Cleared]=True,+[CkAmount],0)) AS ClearedAmt...
it's an optional variable. still working on it. Nevermind.
For anyone else with my original problem: I'd like to tell you what the problem was. Before I started all this NotInList code for my combos, I had set up a form in the "ListItemsEditForm" under data and forgot about it. After going...
I've (again!) done my job and worked through this (walked the code) and I still need help
Private Sub cboPayee_NotInList(NewData As String, Response As Integer)
Dim intAnswer As Integer
intAnswer = MsgBox("Add to the name list?", vbYesNo, "Missing Name")
Select Case intAnswer
Case...
okaaay! The problem is actually in my pop up form, and not the NotInList. Although you helped me fix that too. Thank you for your guidance. I always try and Try and TRY to check everything before asking...
'frm = This Form (me)
'strCombo = This Combo (cboUserName)
'strForm = the form used to add to the table or query
Public Sub EditCombo(frm As Form, strCombo As String, Optional strForm As String)
Dim strOpenArgs As String
Dim lCallsID As Long
Dim strSql As String...
That's what I did. Still get the message.
Private Sub cboPayee_NotInList(NewData As String, Response As Integer)
Dim intAnswer As Integer
intAnswer = MsgBox("Add to the name list?", vbYesNo, "Missing Name")
Select Case intAnswer
Case vbYes
EditCombo Me, "cboPayee"...
oh. Where should I put it? I tried it right after Edit Combo. I tried it after the requery. Which is a repeat, not?
I tried it after the whole select thing. Same thing. Same response.
I apparently don't understand the NotInList function. I have several comboboxes so I made a separate module sub called EditCombo to carry out various actions for different kinds of combos and then return to the line "Me.cboPayee = null", etc. Everything works except when the code runs to the End...
I'm trying to get an ID from a table and the criteria isn't right. If I use frm.name, it returns "frm.name = "frmCheck".
Dim frm as Form
From Calling Form: me
CallsID = DLookup("CBOCallsID", "tblCBOCalls", "CallingForm =" & frm(name))
This returns name = "Microsoft Access" ---...
Option Compare Database
Option Explicit
Public lngInfoXchg As Integer
'ComboBoxUpdate in Access Samples
'frm = This Form (me)
'strCombo = This Combo (cboUserName)
'strItem = the text you typed in the combo
'strDomain = the table or query behind the combo
'strForm = the form used to add to the...
I've had this code in my samples for a long time and it works great in a form module. Since I'd like to use it in several places I tried to make a module and now I can't get it to work. I can't get past line 10. I think the error may be frm. Is this the proper way to return a form name? ...