Populate Form And Subform With Data Based On Search ..

Mar 2, 2007

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 populating 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

View Replies


ADVERTISEMENT

Modules & VBA :: Populate Data Sheet Subform Based On Combo Box Selection ALL

Aug 20, 2013

I have an unbound combobox on a form that is used to filter the records of a subform based on who they have been assigned to. The combo box is based off of a query to the personnel table and utilizes a UNION querry to add the option "**ALL**" with a id number "111111" as the first option in the combo box.

In other words: the combo box has a list of names to choose from and the word "ALL" at the top as the first selection. The idea is that when "**ALL**" is selected, the subform should display all records regardless of who they have been assigned to. I'm trying to accomplish this with VBA. I've started developing the code to try to impliment this, however currently when "**ALL**" is selected, I'm getting a datatype missmatch that seems to be caused by my use of recordset.

Option Compare Database
Option Explicit
Private Sub cboTaskListName_AfterUpdate()
'On Error GoTo cboTaskListName_AfterUpdate_Err
Me.Refresh

[code]...

Also once the queried records are saved into the record set, how can I communicate that to the subform so that it displays them?

View 2 Replies View Related

Forms :: Auto Populate Subform Based On Selection In Parent Form

Apr 30, 2015

I've got a Parent form (frmProspectDetails) with a subform linked (fsubProspectSkill).

This form is for users to enter general information on a prospect (names, position, height, weight, etc) on the parent form and skill levels on the subform.

Currently the subform is set so the user has to manually select the specific skill set for the prospects position, and then enter a value for each skill level(1-99).

I'm trying to get the subform to auto populate with a specific skill set based on the position selected in the parent form, so the user only needs to input the skill level without selecting each specific skill.

This data is then stored in a table (tblProspectSkill)

To add, I've created a form (frmPosition) that lists the specific skills set for each position.

I'm not sure how to get this subform (fsubProspectSkill) to auto populate with the specified skill set from frmPosition.

View 6 Replies View Related

Creating A Search Button That Will Retrieve Data From Table And Populate Form

Jan 24, 2015

I've been able to navigate a lot on my own, but there is one issue I cannot seem to resolve. I have 1 form and 1 table. I have the form set up so that you can enter data, and then press a button, and it will "save" and refresh the form for a new entry. However, I want to be able to pull that entry back up in the form, and fill out additional fields later on.The form is set to data entry = yes because I do want the form to open up as brand new each time.

To sum up my question. I want a text box and search button at the top of my form. When you type an ID number in the text box, and then press search, I want access to populate my form with the information in my data table associated with that ID number.

If I type in the number 1234 and hit search. I want my form to autopopulate with the data in the row for ID number 1234 (all the fields I have already populated). So by searching 1234, the name, phone, background info, etc that is populated in the row will appear.

View 5 Replies View Related

General :: Search Unbound Textbox And Populate Subform

Jun 14, 2012

I have a form with a textbox which when users enter a unique number(barcode) I want to run a query which pics up the barcode number, checks against the product id and fills the subform with the name of the product and price.

The basic details of the product table is like:

product id (Autonumber)
prdoduct name (text)
price
barcodeId (number)

The subform where i want the result to go is the order details fields product name and price.

I am trying to figure out how to do this but my mind keeps going blank, its been a long while since i used ms access.

View 7 Replies View Related

Select A Datasheet Row -- Populate A 2nd SubForm Based On That Row?

Jul 12, 2005

Hi,

I'm not even sure if this is possible to do (I havn't found anything on the Net yet), but I have a Form displaying Customer information, and the vending machines that customer has.

The main form (frmAccount) has 2 SubForms:
1) AddressSubForm (is a Datasheet), listing the many addresses the one account has.
2) VendingMachineSubForm (is a Continuous Form) and displays the machines related to the account.

What I want to do is select an address in the datasheet, and have the MachineSubForm populate with what machines are located at that address. Can this be done?

The Machines and Addresses link by AddressID. Both subforms are built on queries.

Thanks for any help/insight!

Mike

View 14 Replies View Related

General :: Use Fields In Query Based Subform To Populate A Table

May 29, 2015

I have a main screen that has a tabbed form in it. Each of those tabs has a sub-form in it that displays information and allows some information to be updated.

In one tab I have a query based sub-form that returns information related to the project. This information cannot be manipulated or changed as it comes out of a company managed database. I would like the analysts to be able to add more granular information to a new table by inputting information in a dropdown field for one of the new table fields, but utilizing two of the existing sub-forms fields as identifiers in the new table.

View 14 Replies View Related

Subform Is Populated Based On Form Data?

Mar 22, 2006

** Additional Note: Could I possibly just have a field in my main form that pulls data from another table? Warning: bad with code**

I'm not sure I'm looking at this correctly and have tried to figure it out (For about two weeks now). I really hope someone can help with this.

I have to add a "Multiplier" to my form. I have tried this numerous ways but it's not working properly.

What I need is to have a main form with a subform only displaying the relevant field (that being if this month/year and location match up between both the subform table and the main form that is displayed, then show this value in the subform on the main form). With this multiplier displayed, another field in the main form is then multiplied by this value.

Is this the right way to do this or no? I'm open to basically anything. It's just that the 'multiplier' changes from month to month and rather then have people manually enter in the multiplier to the main form for every day of the month, I'd rather a field be automatically populated and therefore the other field automatically multiplying by this.

Is this possible??

View 1 Replies View Related

Display Data On Subform Based On Comboboxes In Main Form?

Jun 25, 2006

Hello, I'm trying to use information based on items selected in a combobox in the main form. Once the user selects the desired info in the comboboxes on the main form, I want the subform to display the data that matches the search criteria in the main form. For instance, if I select a job number, I want everything that matches that job number to be displayed the subform (along with the corresponding job name, version, etc.). I also want to get more specific in a search where I could select a job number, job name, and job version from the comboboxes in the main form to where all the data that matches the search criteria in the main form will be displayed in the subform.

Attached is what I have so far. The form I'm trying to perform this in is the SearchByResults form and the subform is the qryk95 form. I'm trying to populate this using the K95-Template table. I performed a query (qryk95) to select only the fields I want to display in my subform. Any help would be much appreciated.

View 6 Replies View Related

Modules & VBA :: Subform Calculations Based On Parent-form Data?

Jul 17, 2013

I have a form with a subform in a navigation menu. Something like:

Navigation Form
NavigationSubform
ParentForm (header data and some unbound calculation fields)
Subform (Multiple lines tied to query)

I have some fields in the ParentForm (i.e PF1, PF2) that would effect the values on the Subform (i.e. SF1, SF2). Also, there are some user editable values on the subform that will calculate the remaining fields on the subform (still using data from parentform).

My calculations work fine for the changes made on the subform. However I need to be able to calculate all the children lines on the subform when the form loads or a change is made to certain fields on the parentform. My On_Current event only wants to recalculate the first line.

Parent Form
PF1=10
PF2=3
Subform QTY ADJ SF1 SF2
Line 1 5 .05 10.6 112.89
Line 2 8 .14 10.38 105.15
...
Line N
SF1=PF1+(PF2/QTY)
SF2=SF1*(SF1+ADJ)

So if PF1 or PF2 were changed then all the lines is subform would recalc SF1 and SF2. If changes were made to QTY or ADJ, then that line would recalc SF1 and SF2.

View 3 Replies View Related

Forms :: Based On Main Form ID Subform Data Should Be Shown

Mar 19, 2013

I have form where I will show the details of one table(member details table). In same form I have subform where I can get the member family details (here I am using the relationship table), now my problem is when Member detail form open based on the member id, the below subform data should be fetched...

View 6 Replies View Related

How To Populate Data In Subform?

Dec 11, 2005

I have 3 inputs based on which i'll fetch records from table in a subform for the given input criteria. Please let me know how to populate subform programmatically?

I tried source object property and form.recordsource property. It gives me some error or the other. let me know the right syntax to do the above mentioned.

Thanks in advance,
jwala :)

View 1 Replies View Related

Populate Data Based On Selection From Combo Box

May 16, 2013

I have a form that has a combo box in the header. I want to be able to select an employee name and the remaining info in the detail section of the form populate. My other fields are:

Employee Name - text box
Reporting Unit - combo box
Department - combox box
Primary Phone - text box
Secondary Phone - text box
Emergency Contact Name - text box
Relationship - text box
Emergency Contact Primary Phone - text box
Emergency Contact Secondary Phone - text box
B-Alert Txt - combo box
B-Alrt Phone - combo box
e-mail - text box

View 6 Replies View Related

Forms :: Default Entry Into Subform Based On Data Entered In Main Form

Apr 23, 2014

I have a form that request the User to enter a Parcel ID number (99-9a-99-99aaa-aaa-aaaa). The sub form asks for the subdivision number, block number, and lot number. The subdivision number, block number and lot number are normally part of the Parcel ID number but sometimes they can be different. I want the sub form to fill in the Subdivision number, block number, and lot number as a default but allow the user to change the value if needed. currently the sub form will only show what is entered into the table itself if a change is made on the main form the sub form does not reflect the change.

View 3 Replies View Related

Populate Form2 With Form1's Subform Data

Feb 8, 2006

I have a form where a different form opens up when a user clicks a certain button. What I’m trying to do is assign a field value from form1's subform to a field on form2 and it’s telling me "Run-time error ‘-2147352567 (80020009)’, You can’t assign a value to this object." I'm new to VBA, but think I'm on the right track. Could someone please tell me what I’m doing wrong.

The code I'm using is: Me.txtStoreNo = [Forms]![frmCDRData4REF]![sfrmCDRData4REF].Form!txtStoreNo

View 4 Replies View Related

Forms :: Populate Data From Table To Subform

Nov 29, 2013

I want to append/populate all data from one table to subform?

It is possible?

I managed to populate data from one table to another but my relations between form and subform isn't good, because record that is supposed to be filled as the "link master fields" is left blank.

View 3 Replies View Related

Forms :: Drop Down To Populate Data To Subform

Dec 15, 2013

I have:

Tables: Customer and Orders

Relationship: Customer ID is the primary key in Customer and is a foreign key in order table.

I need to create a Form with contains all the customer info from the customer table, as a drop down list. Once the customer is selected, all their orders should appear in a subform. At the minute I can get a form to work which shows all the orders but you have to go to the next record so see the order. For example it will say John smith and one order. The next record will be John smith again and their second order in the sub from.

I have used access in the past and I am fine with creating everything apart from the drop down. I am just a bit lost with the structure.

View 2 Replies View Related

Combo Box - Populate List Options Based On Data Already Entered

Mar 6, 2008

Microsoft Access 2003

Novice and working on a project with deadline... please help.


I have a table w a field that I want to convert into a combo bo and use data in the field as the options:


FIELD: Student Status


OPTIONS:
Enrolled
Suspended
Withdrawn


How do I get the combo box to automatically pull the values from that field into the options in the field when u pull down the drop down box?

Am I being clear?

View 2 Replies View Related

Auto-populate Data Into Field Based On Information Typed Into First Record

Sep 3, 2014

I'm trying to figure out a way to get my access database to auto-populate data into a field based on the information I type into the first record.

So what I'm looking to do is that when I type a name into the UserName Field it will automatically fill in the rest of the field with the same information.

To clarify I'm looking for a way so that when I type something into one record it will fill the rest of the field in with that same information.

View 8 Replies View Related

Forms :: Print Report Based On Subform With Multiple Search Criteria

Jun 14, 2015

I have a problem printing a Subform that uses multiple criteria(in textboxes) as filters.

The search portion of the form works fine. The problem is I have created a report based on the subform and am using the following code to open/filter the report

Code:
Private Sub PrintBtn_Click()
Dim strCriterion As String
Dim strMsg As String, strTitle As String

[Code].....

View 3 Replies View Related

Forms :: Applying Parameter Based Wildcard Search On Subform Filter

Jul 31, 2014

I have a Main form, and a subform which lists client details. On the Main form I have an unbound field. I want to be able to type a word into this unbound field and have it display all company names that have this word in them. ie. I type "Ltd" into the unbound field and it displays all companies with "Ltd" in the title.

I have created a query that does exactly this (Like ("*" & [Enter Word] & "*")), it displays a dialog box and I type in "Ltd" and it displays all relevant companies.

I have tried everything I know to make this work when I use the unbound field on the Main form, but I've had no luck.

View 3 Replies View Related

Forms :: Populate A Table Based On Selections Made Within A Form

Apr 27, 2015

So I'm trying to populate a table based on selections I make within a form.

The form is based of a query that pulls a new product category that needs to be added to my first reference table for products.

The form shows all the new unique product codes, and there is a drop down box with product categories whose source is also the first reference table, so a new code would be:

'JBL - TRX - FVB - TRZ' And based on that new info, I would select from the drop down to select the corresponding category and click 'Add Record' button.

I'm building the event for the button and the code is as follows so far :

Private Sub Add_Record_Click()
End Sub
Private Sub cmbAdd_Record_Click()
'add data to table
CurrentDb.Execute "INSERT INTO tblPVMTable(PVMJoinField, SummaryPVMCategory) " & _

[Code] ....

I keep getting errors with the main portion of code.

Name of table fields :

PVMJoinField
SummaryPVMCategory

Name of Query Fields Populating the Form:

PVM_JOIN_FIELD
cboSummaryPVMCategory

View 4 Replies View Related

Forms :: Populate Form Fields Based On Selection In Another Field

Jul 18, 2013

I have a Customers table and an Orders table. My Customers table is a bit different than the norm because I couldn't figure out any other way to do this.

My client's customers are either businesses (companies) with a contact person, or individual customers. So, in the Customers table, I have the following fields (there are others but do not apply to my problem):

Customer ID
Company
Contact
Customer

So, if it is a company the data entry person would enter the company name and the full name (EX: Doe, John) in the contact field, but if it is an individual customer, then they would leave Company and Contact blank and enter just the Customer name (Ex: Doe, Jane).

So, in the Orders table, I have combo boxes for look ups for the fields Company and Customer.

That works okay, but I would really like for the Customer ID to post into a text box once the Company or Customer has been selected. In other words, the input person would enter the name, then it would show that Customer's ID #.

View 1 Replies View Related

Forms :: Populate Textbox Based On Others Within Form Being Null Or Filled

May 24, 2013

I am fairly new to Access and trying to populate a text box based on whether other textboxes throughout the form contain a date or are null, so as I update the progress of work the textbox that I have located in the header will indicate the status of work flow, this is what I thought might work but I seem to be doing something wrong.

Code:
Private Sub Form_AfterUpdate()
Status = IIf([Date_Raised] Is Null, "New", "")
Status = IIf([Date_Raised] Is Not Null, "Open", "")
Status = IIf([Approved_Date] Is Not Null, "Approved", "")
Status = IIf([Actioned_Date] Is Not Null, "Actioned", "")
Status = IIf([Tested_Date] Is Not Null, "Tested", "")
Status = IIf([Closed_Date] Is Not Null, "Closed", "")
End Sub

View 2 Replies View Related

Forms :: Populate Control In A Form Based Off Of Two Different Fields In One Table

Jun 24, 2013

I am wanting to populate a control in a form based off of two different fields in one table. Is that possible?I have a table called tblEmployeeMaster and it has a LastName column and a FirstName column in which I need to have both first and last name show up in one box on my form?

View 6 Replies View Related

Populate Form Field From Subform Entry

Oct 19, 2006

I have looked at multiple samples on this forum and others and cannot seem to get the result I want working.

Have main form TmLdr made from table of same name. Entries include ReqName and CostCenter. These same entries are on a subform. On the After Update event on the CoRecDt (main form), I want the name and CostCenter entered on the subform to populate on mainform. This subform will be filled out by the user once and as long as they are using their own machine there will be no need to re-enter their name.

I think that I am so close but just a touch away. I am attaching my DB with hopes someone can take a peak at it and let me know what I am missing. Thanks so much.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved