473,657 Members | 2,801 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Populate Form and Subform based on Search criteria

22 New Member
Hi,

I have a form with a subform, Both of them are based on a query.the form displays a productid and its details ,and the subform has matching productnames for that productid.

Now i have a search on the main form wherein the user enters ( search for) the productid, once they click search button, the form should show that particular prod id and details and subform loaded accordingly with that productid matches...seems simple but how do i code this in VBA??

Basically populatuing the form and subform with data based on search..

i am using ODBC coonxn with backend oracle tables..

any help would be highly appreciated!

Thanks!
Mar 2 '07 #1
1 5104
nico5038
3,080 Recognized Expert Specialist
As long as the subform needs to show only the related productnames, you don't need code as Access will synchronize the subform for you when the linakge fields are set.
Just open the mainform in design mode and single-click the subform.
Now open the properties form (press button with hand and white sheet) and look under the Data tab.
It will show a master and child "linkage field" parameter. Enter the controlname of the main form in the Master linkage field and the controlname of the subform in the child linkage field. Now Access will do the work.

Finally add a new combobox to your mainform and select the third option (search a record). This will allow your user ro select a product and jump to the data of the selected rpoduct.

Nic;o)
Mar 3 '07 #2

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

Similar topics

2
2233
by: misschristalee | last post by:
I'm having a brain blockage day.... Scenario: Search Form with 6 text boxes Query has same six fields Each has this IIF: IIf(IsNull(!!),"",!!) with each dictating the correct text box of course. SQL dictates... If text box 1 isNull do nothing or do this OR if text
1
2323
by: edworboys | last post by:
I have a form (Prospect) with a subform (Document). The result I am looking for is this: The user selects a prospect which is made up of Prospect Name, Country, Company and Prospect Type. They can then use the subform to add records into the database with the above information already there. At the moment I have four combo boxes in the Prospect part of the form.
0
1435
by: Jason | last post by:
I would like to be able to place a command button on a primary (parent) form that opens up a subform. I want to use this subform to search for or limit the recordset of data in the primary form. The database is setup as follows: the primary form is named "TestDataCleanup" which is based on a table named "Test_Results". This primary form has multiple subforms associated with it, including "Names_Display" and "SiteAddresses_Display". The...
4
7002
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the user enters the last qualifying field on the main form. In one case this works fine, the subform shows the data the user wants to update -- which means showing all the data put in previously (ie showing this via the requery and the continuous...
3
11959
by: dhowell | last post by:
In reading some of the posts on this group, it appears as though it is not strait forward at all to filter a form, which has subforms, by criteria which are either on subforms or span more than one subform..... This MSDN article however makes it sound as simple as clicking "Filter by Form", entering the search criterial in the form and/or it's subforms, then just clicking "Apply Filter"...... ...
2
3669
by: pankajm | last post by:
Hello Friends: I am trying to populate a subform that has three fields that would pull view only data from a child table. The criteria for this data is to select the three fields where one of them is the value of column 1 of a combo box on the main form. This field is also the master child link between the two tables. The combo field is SSN. So when I populate SSN in the main form, I would like the SSN to be used as a select statement like...
1
3436
by: Chris | last post by:
I need a search form to perform. I have a Form and a subform. The subform is based off a query and the main form is unbound. The query runs perfect, however, I have a command button in the main form with the code: Private Sub Command12_Click() Me.Refresh End Sub That command button is not working and gives me the prompt, "Error
1
4276
by: tomlebold | last post by:
Having problems displaying query results from combo boxes on a sub form, which is on the same form that is used to select criteria. This has always worked form me when displaying query results on another main and sub form. The requery on the sub form and refresh comands on the main form do not work when the form is first displayed and when the selection criteria is changed. Should I be doing a refresh and then repaint of the sub form. ...
5
2079
by: Desmond Shek | last post by:
Hi, I am new to this DB caper and am really struggling. I have a form called customers with a subform called property search. The subform (a continuous form) allows users to search the table 'property' using multiple criteria (postcode, house num etc) and returns a set of matching results. I want to be able automatically populate the a field called LPI (a unquie property ref which is the PK of table property and FK of table customers)...
0
8384
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8302
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8718
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8499
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7314
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.