Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a form based on my transactions table, which has an 'account' combo box in the header to filter the transactions based on the selected accounts.

I used the new Actions (or Macro Actions) to setup the filter, which is basically:

  1. SetTempVar (Name: CurrentAccountId, Expression: [screen].[activecontrol]
  2. ApplyFilter (Where: [Account] = [TempVars]![CurrentAccountId]
  3. RemoveTempVar (Name: CurrentAccountId)

This works very well if the form is loaded by itself, but as soon as I load the form in a navigation form (form with tabs on top and left) and I use the filter again I get the following error:

The action or method is invalid because the form or report isn't bound to a table or query.

I checked online and some posts refer to the SelectObject action which didn't work. It threw another error. Here's what I did (I added a step before step 2 above):

  1. SelectObject (Object Type: form, Object Name: Transactions List, In Database Window: no)

The error I received is:

The object Transactions List isn't open.

The combo box list with my accounts is on the form where this filtering should occur, so:

  1. I'm not sure why my first approach works in the form window when it's loaded by itself
  2. Why would it throw an error in a navigation window

Any ideas?

share|improve this question
    
Did you try using OpenForm to open the "Transactions List" form object before Selecting it? –  techie007 Jun 3 '12 at 20:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.