473,324 Members | 2,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Passing Data From a Sub Form to a Main Form

Hello,

I am a newbie to Access. I have a form where fields are not bound to any table or query. Then I have a command button which opens up a second form (with a subform and a search field) of which the Record Source is a query. When the user types on the search field, the subform data gets filtered accordingly. What I want to do is to populate the fields on the mainform, using the record selected on the subform which is on the second form. Please help! I can provide further information if required.

Thank you!
Charlie
Oct 31 '16 #1
1 740
jforbes
1,107 Expert 1GB
If you were to make your Main Form bound, you could then use DoCmd.OpenForm to open your Main Form and Filter it to the Record of your Second Form's SubForm. To filter the Main Form, set the WhereCondition of the DoCmd.OpenForm.
Nov 1 '16 #2

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

Similar topics

0
by: David Marshall | last post by:
I am a relative newbie and can't seem to figure out how to get past this stumbling block. I am creating an unknown number of dynamic rows (min=0, max=10) in a table whoose cells are populated...
1
by: Susan | last post by:
I have a bound form and subform and am trying to enter the data in both forms programatically. The Linkmaster and Linkchild properties are set. My intent is to be able to look at the data before it...
1
by: Jim Heimer | last post by:
How can I pass data from one child form to another? I have two forms, one (formX) that holds a datagrid (with the results of a query) and another (formY) that consists of many textboxes. I'd like...
8
by: John | last post by:
I have a frameset page with 2 frame, each with a form. Can I pass data (variable) between them ? Thank's
3
by: lavu | last post by:
How would I pass parameters from the main form to my subform at load time. I use Activator.CreateInstance to create the subform. Thanks in advance. Ps: I tried googling for this but found no...
2
by: efi | last post by:
Hi everyone, i have created a form in C# which i load from another form but also from my main menu. whenever i load my form from form1 i would like to pass some parameters from form1 as well. ...
1
by: hlebforprimeminister | last post by:
Hi, I already posted this in the Access section but it fits more here I am having trouble with some forms i am creating for a database. I have a data entry form at the moment that enters...
1
by: Bobby | last post by:
Hi I have a form which I need to call from several different parts of my application. Depending on where it is called from, the Data source will change. The only way I know of to open a form from...
2
by: Neekos | last post by:
Hello all. I have a form that i want to open when i close the current form. On the new form, i need a field to populate with data from the form im closing. Is this even possible? Here's my code...
3
by: cheweedog | last post by:
I have a form that contains 1 subform. Everything works fine until I tab into a textbox in the bottom of the main form. The data in the subform disappears on the form, but the table is updated. ...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.