Pop-up form not showing current record

west

Registered User.
Local time
Yesterday, 17:43
Joined
Feb 11, 2010
Messages
25
I have a demographic (tblMain) table with this fields:
- CaseID – AutoNumber
- Name – Text
- Address – Text
- Phone – Text
- NotesID – Number (Linked to tblNotes.NotesID)


In another table (tblNotes), I have:
- NotesID – AutoNumber
- Notes – Memo


In the Main Form I placed a control button (cmdNotes) to open a pop-up
form in wich user can write the notes.


The pop-up Notes Form has:
- tblMain_NotesID
- tblNotes_Notes


The embeded macro code produced by the (cmdNotes) button control wizard:
Action:

  • - OpenForm
Action Arguments:

  • - Form Name – Form Notes
    - View – Form
    - Filter Name -
    - Where -
    - Data Mode -
    - Window Mode – Normal


The problem: Every time I click the (cmdNotes) control button the pop-up
form goes to the notes of the first record. What I'd like it to do is to go
to the notes of the current record.


Any thaughts?
 
On your form, Create a new button. Use the Wizard to Open a form.
Select the option to "Show Specific Records"
And then there will be an option of which fields you would like the link to be on. Use your Notes ID field to establish the link.

This can also be done using VBA code, but being that you used the wizard, i'm not sure as to if you have any VBA experience, so we'll keep things simple.
 
I think you need a filter on there to filter between noteID on main form and notesID in second form.

vbaInet seems very good at this stuff, try contacting him or waiting for him to reply.
 
On your form, Create a new button. Use the Wizard to Open a form.
Select the option to "Show Specific Records"
And then there will be an option of which fields you would like the link to be on. Use your Notes ID field to establish the link.

This can also be done using VBA code, but being that you used the wizard, i'm not sure as to if you have any VBA experience, so we'll keep things simple.

This does not work, I tried it numerous times myself and it never works, so VBA is the way to go I think.
 
Or just change this part of the macro:

Where -

to this

Where - [tblMain_NotesID]= [Forms]![YourMainFormNameHere]![NotesID]
 
This does not work, I tried it numerous times myself and it never works, so VBA is the way to go I think.

You are right. I tried every combination I could think of just to test
the macro approach but nothing worked for me.

Finally I decided to use a piece of code suggested here and its
working fine.

Thanks to all.

-JC
 

Users who are viewing this thread

Back
Top Bottom