This is giving me a serious headache
strWhere = TempVars("DateLimit") And & TempVars("AccountID")
DateLimit is "Year([CkDate]) = " & Year(Date) and AccountID is long (autonumber)
I've tried quotes all over the place and nothing seems to work.
I have a report that I need to print in booklet form. If I run it to Word it loses a lot of formatting. If I run it to pdf it shrinks the pages. Is there something I'm missing?
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...
I created a helper table for some small tables I.e. tblCombo for color, type, group, etc. So then I use Pat Hartman's Address Book. It worked great until I created the helper table.
Using her code to BuildSql I get:
SELECT tblCategory.CategoryID, tblCategory.Category,
tblCombo.Data AS Type...
I have a query that groups transactions together by ID:
But when I use this query and add another table it loses its grouping:
What am I doing wrong? The addition table is left join.
I’ve worked on this so long that I can no longer see the trees for the forest.
I want to transfer money from one account to another so (on your advice) I’ve created a self join table. Mostly this works except for when there is more than one transfer (bottom subform) in the Check.
The code on...
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...
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" ---...
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? ...
In order to transfer amounts from one account to another I have a subform that's
connected Master = TransactionID ; Child = TTransID. So a new record is created
with a new fAccountID (combobox). What I can't figure out is how to get the new record ID (orange)
into the original TTransID so that...
Private Sub Form_Click()
Dim bm As Variant
Dim rs As Recordset
10 Set rs = Me.Parent.RecordsetClone
'save the bookmark
20 bm = Me.Bookmark
30 With rs
40 .FindFirst "InvoiceID =" & Me.InvoiceID
50 If Not .NoMatch Then
60 Me.Parent.Bookmark =...
To keep from dragging things down I have a default of choosing only the current year transactions.
If I choose Current year, it works
If I choose All, it works
If I choose Current year after choosing all, it works
I cannot choose All after choosing current year. It just keeps returning current...
I have a combo that picks from one of 2 tables so I use a Union query to combine the choices. However, the primary key on both tables creates duplicate ID's in the bound column of the combo box. How do I know which table is chosen?
Public Sub FormFocus()
Dim sf1 As Control
Dim sf2 As Control
Set sf1 = Me!Form.sfcInvoice.Form
Set sf2 = sf1.sfcInvItem
sfl.SetFocus
sf2.SetFocus
sf2.Form!Description.SetFocus
Set sf2 = Nothing
Set sf1 = Nothing
at sf1.SetFocus I get a Variable Not Defined error
This sub is called...
I have a subform with record selectors. The following is the form on click event:
Private Sub Form_Click()
Dim rs As Recordset
Set rs = Me.Parent.RecordsetClone
With rs
.FindFirst "InvoiceID =" & Me.InvoiceID
If Not .NoMatch Then
Me.Parent.Bookmark = rs.Bookmark
End...
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...
I have delete buttons at the end of each item in the invoice (3rd sub form) so I can quickly get rid of a line I don't want. The continuous form adds a blank line and if I hit the delete button on the empty record it gives a 3075 error because it doesn't have an ID yet. Is that a place to put an...
I want to pass the name of my form to the report it's calling. The calling button is on the 2nd sub form.
So I've tried
Me.Parent.Parent.Form.Name
Dim frm as Form
Set frm as Forms!frmAAAA
OpenArgs = Me.Name
the following:
Dim frm As String
frm = "Forms!frmAAAA"...