Macro opens popup form but displays all records or no records

Macro opens popup form but displays all records or no records

Post by mis_pr » Thu, 22 Jul 2004 03:05:10


I've been stuck on this for 2 days. Here's the deal.
I am working (3 levels down/deep)in a subform within a tab object that
is within another tab obeject. Everything works great!
Except here:
1) 3 levels down I have a command button labled "show client address"
that launches a macro that evaluates a yes/no condition in a field on
the same form labeled "Same a Customer address".
2)If the Data in the field is "Yes" it opens the "customer address
popup form" and if "No" it launches the "client address form" This
part works. It does bring up the correct form.
3) My problems is that the form does not open the correct record. It
displays all the records, when I apply a filter to the marco or it
displays no records
4)Both popup forms "Client & Customer Address" contain the relating
field that binds it to the parent form via the parent forms primary
key field.
NOTE: If I launch the popup forms from command buttons they will
display the correct record.
Does anyone know what I am doing wrong. I feel like such a dork.
 
 
 

1. Synchronizing main form record with pop-up form record

2. How do you reference controls record by record on a form that displays many records?

Hi everyone

How do you reference controls record by record on a form that displays many
records?

I've created a form with a detail section that displays all records from a
table. In code, when I reference a control and its properties in the
details section (e.g. Address1.ForeColor), it affects ALL Address1
textboxes. If I change the forecolor for Address1, all 10 or 20 or however
many records there are, get affected. How do you refer to Address1 for any
particular record?

Also, is there an event that fires repeatedly when the form shows all
records?

Please don't tell me to use Conditional Formatting as that doesn't apply to
all controls plus doesn't give me enough flexibility for what I want to do.

This should be pretty simple for someone used to coding Access VBA (I'm new
to it but old at VB in general!). Any help at all that gets me looking in
the right direction would be greatly appreciated.

TIA,
Stephen

3. Display record on Main Form from subform record selection

4. Using Find Record to display record from another form

5. If No Records in Subform, Parent Form Record doesn't display

6. Record Displayed In Form Is The Record Printed In Report

7. display records by navigating through records on alternative form

8. Find button to locate record in form and display that record

9. Find Record action to display a record that is the current record on another for

10. Save subform record, open form, then go to new record

11. Open form and if no matching records create a new record

12. open form, show all records but go to a specific record

13. Open sub forms with linked record if it exists, otherwise a new record

14. Open a form with a blank record and view existing records

15. Edit Existing Records When Form Opens To A New Record