473,467 Members | 2,224 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

subfrm1 textbox "On Click" opens subfrm2 with same record

8 New Member
Hello,

I have a form that has two subforms within it (frm1 - subfrm1, subfrm2)

Does anyone know how I can create an "On Click" event for a textbox -fld1- that is within -subfrm1- (displays records in columnar view -frm2-) which would cause -subfrm2- (displays records in tabular view -frm3-) to display the same record as the value displayed in that textbox -fld1-?

Thanks,

brsawvel
Oct 11 '07 #1
4 2125
brsawvel
8 New Member
xxxxxxxxxxxxxxxxxxxxx
Oct 11 '07 #2
Rabbit
12,516 Recognized Expert Moderator MVP
xxxxxxxxxxxxxxxxxxxxx
What is this? A thread bump? Please don't bump threads unless you don't get a response after 24 hours. That is more for your sake than anything because I start answering threads from the oldest thread forward.

If you're asking about accessing the properties across subforms, you have two options.

You can use the absolute path:
Expand|Select|Wrap|Line Numbers
  1. Forms!FormName!SubformName.Form.ControlName.Property
  2.  
or the relative path:
Expand|Select|Wrap|Line Numbers
  1. Me.Parent.SubformName.Form.ControlName.Property
  2.  
If you're asking about the algorithm then you'll need to let us know what you've tried.
Oct 11 '07 #3
brsawvel
8 New Member
Sorry about that. Saw my previous post dropping back in pages quickly and thought it wasn't going to be responded to.

I'm not sure what you meant by accessing the properties across the subforms, but what I have tried to do was to add this to the "On Click" Event of the textbox -

DoCmd.OpenForm "frm1", acViewNormal,,"[YourCommonIDFieldHere]=" & Me!YourFieldOnSubFormHere

But I receive an error stating the Open Form was stopped.

I don't know if I wasn't clear enough (I'm extremely new at using Access, VB, and SQL), but I have two subforms within a form that retrieve data from the same table but display them differently (columnar and tabular). And the tabular displays more information than the columnar. I would like the textbox (which value is the pk) in the columnar subform to have an "On Click" event that tells the tabular subform to display the same record.
Oct 11 '07 #4
Rabbit
12,516 Recognized Expert Moderator MVP
On Click may not work, I'm not sure. You may have to use On Current. But I see no reason On Click shouldn't work.

Subforms are not "forms". They are not opened nor can you refer to them using their object name. Also, I'm not even sure you can tell the subform to go to a certain record from outside the subform. I'd have to do some testing to be sure.

I think you may have to use the Filter property of the form. You'd have to access the property using one of the two paths I laid out earlier.
Oct 11 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Thonglao Rud | last post by:
I'm trying to clear all textbox on the form. foreach (Control c in this.Controls) { //if (c.GetType() == typeof(TextBox)) if (c is TextBox) { // Found it c.Text = "";...
4
by: Samy | last post by:
Hi There, I have a user control with a textbox and a button which when clicked opens a calendar control(calendar.aspx page). When I select a date from the calendar control, the date is supposed to...
3
by: RR | last post by:
I have a button on a form (form A) that opens another form. The form that opens (form B) has a listbox that is populated with a call to a function in the "on current" event. When form B with the...
3
by: JoelH | last post by:
This is really weird... I'm using Visual Basic 2005 Express I have a form - Form1 - with a control called txtStatusBox I have a module attached to the solution for storing some other code. This...
6
by: Ryan | last post by:
I have a windows form that I want to force validation on controls (text boxes) when the user clicks a "Save" button. The only way I've found to do this is to cycle through every control and call...
6
by: MarkoBBC | last post by:
Hi everyone, First a brief description of my form: I have a subform within a main form. In my subform, I have a listbox displaying address information by firm name. A user first has to select a...
1
by: perhapscwk | last post by:
there is a array and i want to display it in a textbox (resultarray) on same screen...but it now works..please help.. thanks. var qtqt =...
7
by: TechnoAtif | last post by:
Hi..There is again a similar problem..Now i;ve got the option values of list?menu box to show the textbox. If the option value of list is yes then the textbox is to be displayed . Can anyone...
1
by: lmj24 | last post by:
Hi, I am using MSAccess 2002 Windows 2000 (stop laughing!) I am trying to use a function to generate a string in a textbox on a form. I can't use expression builder because the expression is too...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.