Pass data from one form to another (1 Viewer)

Louise Wallen

Registered User.
Local time
Today, 00:32
Joined
Jun 20, 2017
Messages
17
Ok so to be clear do I apply this code to the second form now (frm_addedit_comment)?
Also, I'm laughing at how dumb I am because I don't know if when you say yo... if you are talking or I need to actually paste the whole thing in there?
 

RuralGuy

AWF VIP
Local time
Today, 01:32
Joined
Jul 2, 2005
Messages
13,826
Everything we've done so far is to the 1st form.
 

RuralGuy

AWF VIP
Local time
Today, 01:32
Joined
Jul 2, 2005
Messages
13,826
Also, I'm laughing at how dumb I am because I don't know if when you say yo... if you are talking or I need to actually paste the whole thing in there?
My boo boo. That should have been TO not yo.. :(
 

RuralGuy

AWF VIP
Local time
Today, 01:32
Joined
Jul 2, 2005
Messages
13,826
This change will not make any difference to how it runs yet. I am a real lousy typist if you hadn't figured it out yet.
 

RuralGuy

AWF VIP
Local time
Today, 01:32
Joined
Jul 2, 2005
Messages
13,826
Once that's done we'll work on form #2. I need to understand why you are using a ComboBox on this form.
 

Louise Wallen

Registered User.
Local time
Today, 00:32
Joined
Jun 20, 2017
Messages
17
Hello, yes I am still here :)
So if I clean up the yo... to to... where am I pasting this code though? I closed the btn code as it opened the form, so do I just continue on in the same place?
 

isladogs

MVP / VIP
Local time
Today, 08:32
Joined
Jan 14, 2017
Messages
18,212
Can I just say how much I'm enjoying reading this exchange .... :)

Can't help but wonder whether using something like Teamviewer might get you there a tad faster though
 

Louise Wallen

Registered User.
Local time
Today, 00:32
Joined
Jun 20, 2017
Messages
17
OK I understood what you meant reading it back and changed that line. I've tested the button and it just loads the form in the same way as before
 

RuralGuy

AWF VIP
Local time
Today, 01:32
Joined
Jul 2, 2005
Messages
13,826
Can I just say how much I'm enjoying reading this exchange .... :)

Can't help but wonder whether using something like Teamviewer might get you there a tad faster though
Hi Ridders,
I'm sure it would and I have TeamViewer but then others on the forum lose the benefit of the exchange.
 

Louise Wallen

Registered User.
Local time
Today, 00:32
Joined
Jun 20, 2017
Messages
17
@ridders haha I can't help but feel sorry for the next person who googles and stumbles by this post and has to read all my questions, just to get what they need done... but then again maybe it will help someone else out if it is very basic!
 

RuralGuy

AWF VIP
Local time
Today, 01:32
Joined
Jul 2, 2005
Messages
13,826
OK I understood what you meant reading it back and changed that line. I've tested the button and it just loads the form in the same way as before
Good. Now why are you using the ComboBox on the 2nd form?
 

isladogs

MVP / VIP
Local time
Today, 08:32
Joined
Jan 14, 2017
Messages
18,212
I thought post #23 was particularly special - anyway I don't want to stop the 'flow' so am butting out again now...!
 

RuralGuy

AWF VIP
Local time
Today, 01:32
Joined
Jul 2, 2005
Messages
13,826
I thought post #23 was particularly special - anyway I don't want to stop the 'flow' so am butting out again now...!
See ya! You're welcome to butt in any time you want. :)
 

Louise Wallen

Registered User.
Local time
Today, 00:32
Joined
Jun 20, 2017
Messages
17
I'm using a combo box incase the user decides to switch the comment to another project? But I could just do away with this is need be and only let them add a comment to the project they are in?
 

RuralGuy

AWF VIP
Local time
Today, 01:32
Joined
Jul 2, 2005
Messages
13,826
It depends on how you want YOUR system. They did press the add a comment button to this project, right?
What is the Record Source of this 2nd form? Does it point to the same table as the 1st form? Are you using queries as a record source or just tables?
 

RuralGuy

AWF VIP
Local time
Today, 01:32
Joined
Jul 2, 2005
Messages
13,826
BTW, Colin Riddington (Ridders) is a new friend I've made that creates remarkable software. He's on your side of the pond as well. :)
 

Louise Wallen

Registered User.
Local time
Today, 00:32
Joined
Jun 20, 2017
Messages
17
Thank you I noted that he Ridders is from Somerset :)
In terms of the frm_addedit_comment it saves data to another table that I called project_comment
This links the project_ID, Employee_ID, comment, date_time stamp.
Hope that makes sense
 

RuralGuy

AWF VIP
Local time
Today, 01:32
Joined
Jul 2, 2005
Messages
13,826
If you are not using queries as a record source for your forms, you should be. It will save you from some locking issues later on. Okay, let's add a Load Event in code to the 2nd form. Use the same method you did to add the click event to the 1st form button. Show the form in design view. Show the properties sheet. Click on the Event tab of the properties and select the OnLoad event "..." button.
 

Users who are viewing this thread

Top Bottom