NEED HELP PLSSSS Main Form to Popup Form Problem

mikeinaussie

New member
Local time
Tomorrow, 04:45
Joined
Oct 24, 2010
Messages
4
I have 2 forms / tables

Table 1 : PropertyDetails
[PID] (Auto Gen No. Primary)
(Other Fields such as name etc but not relevant for this thread)

Table 2: Notes
[NID] (Auto Gen No. Primary)
[PID] (Number)
[NOTES] (Memo)

Forms 1 and 2 are as Above.... PropertyDetails and Notes

Form 2 (Notes) is a popup for writing notes pertaining to the record (PID) in the Main Form 1

Now my problem....

What code or source do I need to write to link Popup Form 2 to Form 1 (Main Form)? When I write notes in the popup it needs to save it to the main record so when I change the property [PID] only the notes I wrote stay with that record [PID] on the main form.

Im going bananas trying to get it right. I dont care if this code is in the button of the main form or its a query etc. I just need to get my head around this...

Thanx in advance Mike
 
You could try a variation on this:

http://www.access-programmers.co.uk/forums/showthread.php?t=139266


Maybe use a update sql string to insert notes into your desired table.

Or if the 1st form is to stay open then just insert the notes text from the pop up into the desired field in the 1st form

Forms!1stFormName.txtboxname = me.popuptxtbox

and put this code under an 'on click event' on an OK button on the popup form for example.
 
Thanks for this.... I might be able to incorporate the Zoombox. You are right though, I am running out of room on the Main Form. I have a Property Managment DB and running that part in Access.

Plus I wanted it to look nice, hence the popup. Do you know what the right way to make the popup info stay saved to the main form?

I will use the Zoom Form if its the easiest. I dont have any more room on the Main Form (1) for a subform which would be the most preferred option.

Cheers Mike
 
Do you mean how to get the text from the textbox on the calling form to the textbox on the zoombox form and back again?
 
Nope... Im fine with the Zoom Box.... had a good look at the sample...thanx....

I just thought its neater with a form button going to a popup form, however I will look at a button to do the same with the zoom, it might use the same code so it will be easy to implement.

Thanks for your quick help. I will work on this today and update the thread if I have it worked out....

Cheers Mike in Aussie :D
 
By far the simplest solution me thinks is to have a hidden textbox on your form (very small below your button for example) and then call the zoombox with your button and telling it to link to that textbox like on the zoombox sample.

To get the textbox to be hidden just set the textbox 'visible' property to No

Then you don't have to see the textbox and just have the button.
 
Last edited:
The attached db illustrates how to link the zoombox to a form textbox via a command button.

So if you do not want to see the textbox then just make it very small and set 'visible' property to No.

The code in the ZoomBox upgraded is such that when the form closes it triggers a 'If form.dirty = true then form.dirty = false' which forces the text to be saved on the underlying table.
 

Attachments

Last edited:
Thanks for your upgrade and will look at this later after I post this.

Here is my sample that I need to work. It will give you an idea of what I need to happen and for the Notes to SAVE to the main form.

Notes is a Multiple Form

So when you move through the Main records the Notes for each Main record remain associated to that Main Record.

I need a date on the Notes so when we enter a comment we know what date that it happened on.

I don't mind if its a ZoomBox, I just need these fields DATE and NOTES

Mike
 

Attachments

Users who are viewing this thread

Back
Top Bottom