Transferring Query Results From One Form To Another

Aug 27, 2004

I have one table of records that I would like to query and display the results.
I have created a form that asks the user for criteria for the query (search).
Then I want to display the results from that query in another form (results).
The problem is that I cannot figure out how to do it.

The results form is using the query as its source. I have tried running the
search and then opening the results form, but I get a message saying that
I tried to lock the table but it was in use.

Is there a way to link these forms so that i can bring up the search form,
perform the search, and have the results brought up in the results form?

Thanks for the help.

View Replies


ADVERTISEMENT

Transferring Data To A Second Form

Dec 15, 2011

I have created a database that deals with inventory control. My next step that I have been approaching is to click a command button that opens up a separate from but takes specific information from FORM 1 into the new FORM that I just created.

So if a specific Employee takes out 4 aprons from a total of 50 and there are now 46 left, I would like the submit button to transfer that data over accordingly to Inventory control form in the correct text boxes.

Specific Example: If employee John Doe takes 4 aprons from a total of 50 which now leaves 46 how can I transfer that data into the other form showing specific information like 'Product ID' taken, 'Date' it was taken, 'Product Description', 'Employee' who took it, 'Amount Taken' and, 'total' left. I need the extended information to show up in the text boxes on form 2.

Is there a certain code that does this? Here are screen shots so you can get a visual....

View 2 Replies View Related

Transferring A Field From A Form To A Report

Jan 15, 2006

Hi All,

I've attached a picture which shows the problem.

I need to know the expression required to transfer the name of a football team (selected on a form with a combo box) onto a report.

The teams all have ID numbers, and so far its the ID thats getting transferred, not the team name.

Any help is appreciated

Thanks

Colin

View 7 Replies View Related

Forms :: Transferring Data From One Form To Another

Mar 3, 2014

I have one form that is serving as a popup while the parent form remains open... in my code for the popup I'm trying to transfer the value of a textbox to the actual textbox on the parent form... seems easy, but I get this message: "You can't reference a property or method for a control unless the control has the focus" with this code:

Private Sub btnExportData_Click()
[Form]![Worksheet]![txtBookedNotBanked] = Me.txtTotal1.Text
End Sub

... also is there a way to code this so the popup closes when the transfer is made?

View 5 Replies View Related

Forms :: Transferring Data From One Form To Another

Dec 14, 2014

I have a form (frmJob) that has a combobox (cmbCompany). If a new company is not in the table the NotInList code opens another form (frmCompany) and a new company is added into the textbox (txtCoName).

The code below is the code that closes the frmCompany after entering new company.

The first part of the code (Add new company into table) works and adds the new company into table but the second part (Add new company into frmJob) does not, and the new company does not appear in the cmbCompany combobox. Note: frmJob remains open while data is entered into frmCompany.

How can I get the second portion of the code to work?

Code:
Public RemCompany As String
Private Sub cmdCloseCompany_Click()
"FIRST PORTION - Add new company into table
Dim dbCom As Database
Dim recCom As Recordset
Set dbCom = CurrentDb

[Code] .....

View 4 Replies View Related

Transferring Query Data To Excel

Mar 28, 2008

Not sure how easy this one will be but here goes.

I currently have a database which collects details of event effecting our business and am using a simple query that displays events within a defined date range.

I have also set an excel sheet which on the main worksheet appears as a calender format for a particular month which is updated by data in the access query. At the moment I tranfer the query to excel and it appears as a new sheet which I then have to link to the master calender.

Is there any way when exporting to excel to tell access to send the data to a particular sheet and cell range and even more advanced tell it were to put certain dates information? i.e send 1st March info to cells A1 to A4, 2nd to A5 to A8 etc.

Hope someone has some ideas on this one - even being able to send all data a specific cell range would be useful

View 2 Replies View Related

Transferring Data From Form To Form When Starting New Record

Sep 7, 2011

OK so my situation is a simple 1 to many relationship where the main form has the primary key and the secondary input form needs the foreign key to be passed to it to link the 2 tables.

Say for example 1 Site has many sections (Plants). The main menu form can therefore select the Site and filter to another combo box containing the plants that are attached to that site. The user can then either edit the plant or add a new plant record linked to the site.

I have figured out how to edit the plant attached to the site using a macro that opens the form Plants with the site ID passed from the main form however when I want to enter a new Plant I still need the site ID passed to the Plants form however using the following code

DoCmd.OpenForm "frmPlants", acNormal, , , acFormAdd

It simply opens the form as a new record and therefore will not transfer the SiteID

No doubt this is not the hardest thing to do I just can't work out how to do it

I have seen somewhere using code similar to this

stLinkCriteria = "[SiteID]=" & Me![SiteID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

But I can't seem to get it to work.

View 1 Replies View Related

Modules & VBA :: Transferring A Form To Password Protected DB

Feb 10, 2014

I have a mdb file that does not have database or user level security, but it does have a VBA password.I want to transfer (overwrite) a new form to this database from another Access database. The form I'm exporting has VBA code. When I try using docmd.TransferDatabase I get an error. The error is:

"The TransferDatabase action was canceled."The line is:

DoCmd.TransferDatabase acExport, "Microsoft Access", txtCheckInFile, acForm, "SubformLineSummaryContractor", "SubformLineSummaryContractor", False, False

where txtCheckInFile is the location and mdb file name I'm trying to send the export.It might be because the form already exists. So, if I go into the database and delete form, and repeat the export I get the message:

"Microsoft protect this Visual Basic for Applications Project with a password. You must supply the password in the Visual Basic Editor before you can perform this operation."My question is it possible to transfer a form to a MDB that has a passworded VBA? I know the VBA password.If not, perhaps it is possible to remove the VBA password in the database (using VBA), make my export, and then add the password back in?

View 2 Replies View Related

Access 2000 :Transferring Test From Form To Report

Dec 9, 2006

I have been trying unsuccessfully to transfer about 20 details describing the name, up to 14 different colours, prices etc and one image of beads from the details displayed on a form to a report. I have no problem displaying the details of one bead using a combo box but then I want to send these details to a report. After that I select another bead and then want to send these details to the report.

The report is divided into 12 rectangulars to represent 12 sections of a display box. This tells the shop owners which beads to put in which section as display is important for sales. as there wooden beads, glass beads, plastic beads animal beads, letter beads etc, etc.

I have gone into this details so you will understand what I am trying to do. I would be very grateful for help but I am sure will realise that I am technically inept and please when you try to explain things to me to remember you are dealing with an idiot.

View 1 Replies View Related

Form Record Navigation Transferring To Next Form

Apr 24, 2005

on main form i have 6 buttons to take me to different forms. these other forms display different details relating to the same record im looking at on main form.

SO, i hit the record navigation button and it flicks to show record 2's details, then i hit my button and it takes me to my new form BUT starts from record 1, i want it to show the current record in looking at on main form.

i feel ashamed asking this, must be simple thing to do.

thank you for any advice.

View 3 Replies View Related

Displaying Query Results In A Form...

Jun 17, 2006

I have created a Query to search for clients in my database, the query and the search all work fine, however it would be nice to have the query post the results into a form I have created to display clients data rather than posting the results in a tables view.

Is there anyway todo this?

Thanks in advance.

View 1 Replies View Related

How To Open Results Of A Query In A Form?

Apr 17, 2007

Hello. I have a problem which has me stymied. I have created a Query-by-Form in which the criteria for the query is two combo boxes. I had no problems setting that up, but I want to display the results of this query in another form. I know this is possible, but do I need code for this? Any help/suggestions would be greatly appreciated!

View 3 Replies View Related

Fill Form With Query Results

Feb 24, 2005

In the attached db (both 2K and 97 ver) there is one form. Fill in the Date with 12/01/04 and the Start with 12/01/04 and Stop with 12/31/04. Press the Run Query button. The query is displayed...

How can I do it so on button press the form is filled with the query results?

View 1 Replies View Related

Return The Query Results On The Form

Sep 13, 2005

Hi,
I am not much familiar with VB Coding.Can any body please help me with this Please:When i click on submit button,it has to show the query results on the Form.Please find the below code:

Private Sub Command_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSql As String
Set db = CurrentDb
strSql = "SELECT Interface.[Interface ID], Interface.[Interface Name] from [Interface]"
Set rs = db.OpenRecordset(strSql)

Do While Not rs.EOF
Debug.Print ("Interface ID: " & rs![Interface ID] & "Interface Name: " & rs![Interface Name])
rs.MoveNext
Loop
rs.Close
db.Close
End Sub

#######################
It is not retrieving any thing.IF my code is wrong,Please advice me with the necessary steps to view the results on the form,when we clicl on the submit button.
Thanks,
Kanuri

View 3 Replies View Related

Displaying Query Results In Form

Sep 13, 2006

Forgive me for what may sound like a dum question -- Access is completely new to me.

I have my table. I have this displayed as a form.

At the bottom of the form, I have a text box and a command button.

The user enters in a key value. The command button triggers a macro that runs a query.

Now, I'd like the form to display the data returned from the query. How?

I tried creating a new form with its Record Source set to the query. I had the macro close the original form, run the query and open the new form. But before the new form could be opened, Access prompted me for a 'parameter value' (I assume so that the query could be run again).

What am I doing wrong?

View 3 Replies View Related

Displaying Results Of SQL Query On Form

Dec 15, 2006

I searched the archives and Access Help and couldn't quite find the answer to this question, which is no doubt simple.

I have a form showing Projects with an embedded subform showing all the Buildings associated with a given project. In the form footer section of the subform, I would like to display summary information about the buildings in the project being displayed, such as count of buildings, count of residential buildings, count of commercial buildings, and so on, and I would like these summary values to update as users add or change building information.

I know how to write the SQL query to pull this information, but do I use a text box or some other vehicle to do this? Using a text box as a calculated control, I was able to produce the count of buildings using:

= COUNT([UnitID])

To get the count of residential buildings, I need to be able to specify "WHERE bldgtypeID = 'R'"...I can't get the text box to display results of an SQL statement. Can text boxes handle SQL statements?

I really appreciate any suggestions you have.

View 10 Replies View Related

Form Using Dynamic Query Results

Apr 29, 2006

Hi, hope this is a reasonable thing for semi-beginner to intermediate person to do.

Our MS Access 2000 db shared on a server stores projects, categories of projects, clients, contractors doing the projects. Contractors are offered projects within their chosen categories based on their order on the list (last company who was offered a contract goes to bottom of list, like that).

Currently we print out a phone list of the contractors (in desc. date order of the most recent offer accepted or refused), then we phone down the list until someone accepts. Later we enter all those offers in order on frmOffers to store the date & time stamp of that offer.

Problem is, several contracts can be on offer on a given day, so when a company accepts/declines Project A, that company is still showing as high on the (paper) list for Project B. So when we have 3 people phoning they don't know they've offered multiple contracts to the same company this morning.

Is it possible for a form "Offers" to be based on a query that keeps updating like that? For example, you open frmProject to display details of a certain Project, cmd button to open frmOffers (continuous form, showing all offers so far with company, phone #, "accept"/"decline" & date/time stamp). Then, when you tab to the next record, can you have it show which company is next in line (even as the person beside you has updated their frmOffers in the meantime)?

Would you need to have a separate table storing only the most recent offer for each company? If so, how would you get that updated all the time?

Anything you could offer to point me in the right direction would be very much appreciated!!

Thanks,

View 1 Replies View Related

Displaying Query Results In A Form

Feb 26, 2008

Hi everyone,

I have a query which totals the amount of all invoices for a specific project number. I would like to take this total and have it displayed on the form from where overall project information is inputed.

Right now I have a table which shows general project information and a table showing invoice infomation (linked to the general table via a project #)

I also have two forms, one for general info and there's a button which opens the invoice form. When the invoice form opens, it opens an invoice with the corresponding project number shown on the general form. I would like the total invoice amount (from the query) displayed on the corresponding general form.

ex: in the general form for project# 100, I click invoice once and enter $50, I click invoice again and enter $100. The query automatically shows a total of $150 for project# 100. I would like this $150 displayed on the general form for quick reference.

Thanks for all the help

View 1 Replies View Related

Complex Query/form Results Unexpected

May 16, 2006

I've got a query pulling data from a view I created that gives all the data I need. The query gets it's criteria from a form with 10 combo boxes, a radio box with 3 options and 2 date fields for the timeframe to run the report in.

The issue:
over half the columns of data that the radio buttons can limit results by have null values but only two of the columns are excluding records where the values in them are null. As any combination of the combo boxes are null I'm using the following format for my criteria per column
IIf(IsNull([Forms]![Margin Dialog]![InstallerOption]),[Installer_from_Web],[Forms]![Margin Dialog]![InstallerOption])
That is an example of a column that works, the following is a column that is excluding null values no matter what I do
IIf(IsNull([Forms]![Margin Dialog]![AOIOption]),[ProductType],[Forms]![Margin Dialog]![AOIOption])
I am not seeing the error and could use some thoughts.

View 13 Replies View Related

Pop Message In Form Based On Query Results

Jan 12, 2006

G'Day:

I have tried numerous things to try and create a pop up message or form to alert users of a timing conflict in a scheduling program.
I am not real familiar with codes and am not sure how to handle this.

I used Jason Browne's web site to help me construct a query that will list a result of time conflicts (ie some project is scheduled to occur before another one is completed).
What I need to have happen is the alert message or form opens when this conflict occurs but does nothing when the timing is ok.

I am not very familiar with code and am having a road block mentally. All help is appreciated!

THANKS

View 3 Replies View Related

Show Count Query Results On Form

Jan 24, 2006

I have a form that I am trying to show in a text box the results of a count query. The query has two fields in which one is a check box. The criteria for the text box field is set to true to list all that are checked. I want the query to show all the records that are true. This works if I run the query, but the result isn't showing in my text box on the form. On the form text box properties in Control source I have =DLookUp("[Run Number]","Control Room Drumctqry"). Run Number is the field that I am counting, Control Room Drumctqry is the query. Any idea as to what I am doing wrong?
Thanks,

View 7 Replies View Related

Show Count Query Results On Form

Jan 24, 2006

I have a form that I am trying to show in a text box the results of a count query. The query has two fields in which one is a check box. The criteria for the text box field is set to true to list all that are checked. I want the query to show all the records that are true. This works if I run the query, but the result isn't showing in my text box on the form. On the form text box properties in Control source I have =DLookUp("[Run Number]","Control Room Drumctqry"). Run Number is the field that I am counting, Control Room Drumctqry is the query. Any idea as to what I am doing wrong?
Thanks,

View 1 Replies View Related

Display Query Results On Form Via Text Box

Aug 27, 2004

Hi,
I have created a form (Form1) based on a table (Table1) and also a Query based on this table (Query1). I calculate a field in the query (Expr1: [column1] + [column2])
Now i have created a text box on Form1 that should display Expr1.
I know I could also calculate the value directly via the expression builder, but I would prefer to simply display Expr1 from my query. Which is the syntax I have to use in the Expression Builder?
I tried "= [Query1]![Expr1]" but it does not work.
Thanks for your help
Tigrou

View 3 Replies View Related

Forms :: Display Query Results In A Form

Jul 25, 2014

I am trying to allow end-users to only use buttons to navigate and display records in my database (so they don't know access is in the background) I have query that runs when they press a button but after they run it there is no way to get back to the main interface screen i.e. there is not a place to put another button and close the query. I was looking into creating a form to display the query results in datasheet view but it is not appearing the way I want. I inserted a subform and the results got better but I also do not like the way it displays because the user can see the subform, simple solution to get my data to display in the form so a user can view the results similar to datasheet view?

View 3 Replies View Related

Forms :: How To Sort Query Results With A Form

Aug 14, 2013

Essentially I have a table for rooms around my school and what the rooms contain. Most of the details for the rooms are Boolean (e.g. If the room has a projector, Yes/No).

So what I am trying to do is have a form where i can select a checkbox(s) and if i tick one, a query that holds all the room details will only show rooms with projectors in them, which i can then display those results in another form.

My question is how do I get the check boxes in the form to narrow down the room results to only show the ones with the criteria i have selected in the form?

View 1 Replies View Related

Forms :: Query From Form To Return All Results

Jan 6, 2014

I have a form that displays multiple records in datasheet view. I want to query off of that form and return all results for all records being displayed. However, I'm not sure how to tell Access to do this. Access instead wants to return records for only the first displayed record in the form or the record that is highlighted by the cursor.

In the attached image you can see a list of AccountingUnits (AU) going down. My query using AU from the form as criteria will only return records for AU 114510 since it is the first record, but I would like to see records for all AU's being displayed by the form. How can I do this?

View 13 Replies View Related







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