Getting selected record from "Search Part" pop up form to main form (1 Viewer)

Linda1503

Member
Local time
Today, 14:46
Joined
Sep 3, 2021
Messages
77
Remove the ProductID and the full stop and reenter the full stop.
Not even sure how you switch intellisense off TBH, nor why :)

Here are my Options
View attachment 95173
That works :) duh! Thanks but the only options it gives are the name of the button the code is in and ActiveControl, AfterDelConfirm etc - would send a screen shot but it disappears on nip!
The pop up form is Product Search, the sub form datasheet I'm selecting from is named Child1, any idea how I would refer to a selection in that?
 

Linda1503

Member
Local time
Today, 14:46
Joined
Sep 3, 2021
Messages
77
Probably not switched off, but if the code will not comply because there are other errors somewhere it will stop working.
Hit Debug > Compile to fix all errors first.
Hi, the database compiles fine apart from this wee bit of code - not switched off - I'm just not switched on in how to use it :)
 

mike60smart

Registered User.
Local time
Today, 14:46
Joined
Aug 6, 2017
Messages
1,159
Can you upload the database?
 

Linda1503

Member
Local time
Today, 14:46
Joined
Sep 3, 2021
Messages
77
That works :) duh! Thanks but the only options it gives are the name of the button the code is in and ActiveControl, AfterDelConfirm etc - would send a screen shot but it disappears on nip!
The pop up form is Product Search, the sub form datasheet I'm selecting from is named Child1, any idea how I would refer to a selection in that?
Can you upload the data

Can you upload the database?
Sorry had to delete the customer details - even so the file size is too large to upload...
 

Gasman

Enthusiastic Amateur
Local time
Today, 14:46
Joined
Sep 21, 2011
Messages
10,354
That works :) duh! Thanks but the only options it gives are the name of the button the code is in and ActiveControl, AfterDelConfirm etc - would send a screen shot but it disappears on nip!
The pop up form is Product Search, the sub form datasheet I'm selecting from is named Child1, any idea how I would refer to a selection in that?
Well that would be Me.SubformControl.Form.ControlName ?
Adjust names accordingly.
 

Linda1503

Member
Local time
Today, 14:46
Joined
Sep 3, 2021
Messages
77
Probably not switched off, but if the code will not comply because there are other errors somewhere it will stop working.
Hit Debug > Compile to fix all errors first.
Sorry should have replied to this all code compiles fine untill this line of code is added...
 

Linda1503

Member
Local time
Today, 14:46
Joined
Sep 3, 2021
Messages
77
Well that would be Me.SubformControl.Form.ControlName ?
Adjust names accordingly.
I'm still doing something wrong - If you have a main form (which is not involved at this point), a subform & a sub sub form (which is in datasheet view & which has an unbound combo box filtering it) how would you get the current record selected in the sub sub form datasheet to the sub form in vba code in on click of a button?
Or will I just tell them to remember the filter code and input it again - I do hate to woose out :-/
 

Linda1503

Member
Local time
Today, 14:46
Joined
Sep 3, 2021
Messages
77
I'm still doing something wrong - If you have a main form (which is not involved at this point), a subform & a sub sub form (which is in datasheet view & which has an unbound combo box filtering it) how would you get the current record selected in the sub sub form datasheet to the sub form in vba code in on click of a button?
Or will I just tell them to remember the filter code and input it again - I do hate to woose out :-/
Error5000.JPG
 

Linda1503

Member
Local time
Today, 14:46
Joined
Sep 3, 2021
Messages
77
I'm still doing something wrong - If you have a main form (which is not involved at this point), a subform & a sub sub form (which is in datasheet view & which has an unbound combo box filtering it) how would you get the current record selected in the sub sub form datasheet to the sub form in vba code in on click of a button?
Or will I just tell them to remember the filter code and input it again - I do hate to woose out :-/
Not convince that's how you spell woose :) , whoose, wouse?
 

Gasman

Enthusiastic Amateur
Local time
Today, 14:46
Joined
Sep 21, 2011
Messages
10,354
Think of the hierarchy of the forms.
Try using the Builder in the Query GUI to get the correct syntax, copy and paste that.
 

Linda1503

Member
Local time
Today, 14:46
Joined
Sep 3, 2021
Messages
77
Think of the hierarchy of the forms.
Try using the Builder in the Query GUI to get the correct syntax, copy and paste that.
No idea what or where the Query GUI is - giving up for now ... got to pull user instructions together - they'll just have to put up with my inadequacies :)
 

Gasman

Enthusiastic Amateur
Local time
Today, 14:46
Joined
Sep 21, 2011
Messages
10,354
No idea what or where the Query GUI is - giving up for now ... got to pull user instructions together - they'll just have to put up with my inadequacies :)
When you create a query in design mode, that is the GUI.
In that screen is the Builder that allows you to select a control via a treeview like control.
1633880412570.png
 

Gasman

Enthusiastic Amateur
Local time
Today, 14:46
Joined
Sep 21, 2011
Messages
10,354
Hi Linda1503,
I cannot see that you have uploaded your DB, but I saw a PM post from mike60smart, so assume you gave him your DB by some other method, other than loading up here?
I thought you (and others here) should be aware that he is now asking for help on how to fix your problem over on UA, where he asks most, if not all of his questions on VBA.
https://www.utteraccess.com/topics/2062029/posts/2788019

So if it comes back as fixed, you can be certain it was not Mike doing the work, but someone else. 🤬

In fact he is crossposting on your behalf. :mad:
 
Last edited:

Linda1503

Member
Local time
Today, 14:46
Joined
Sep 3, 2021
Messages
77
Hey I think it's his hobby - no hassle - Thank you for the naming conventions & hints n tips - working on it now (arghhh!)
I'll let you know if I get there :)
 

Linda1503

Member
Local time
Today, 14:46
Joined
Sep 3, 2021
Messages
77
Hi Linda1503,
I cannot see that you have uploaded your DB, but I saw a PM post from mike60smart, so assume you gave him your DB by some other method, other than loading up here?
I thought you (and others here) should be aware that he is now asking for help on how to fix your problem over on UA, where he asks most of his questions on VBA.
https://www.utteraccess.com/topics/2062029/posts/2788019

So if it comes back as fixed, you can be certain it was not Mike doing the work, but someone else. 🤬

In fact he is crossposting on your behalf. :mad:
I know this is a bit of a sad question but ... how do you get all the emojis? I can only do a smiley face which gags me!!!
 

Users who are viewing this thread

Top Bottom