Form Query And Table

Jan 20, 2006

I have 3 fields on a form that are combo boxes. The first field is linked to a table with Department names. The second field has Supervisors for the departments. When I first load the form and select a department, it correctly runs the query that populates the supervisors in the department, in the second combo box. However, if I select a different department, it does not change the list of supervisors.

Help!!!

View Replies


ADVERTISEMENT

Query - Form - Table

Feb 14, 2005

Hi all,

Not sure if I've done the right thing but I'm part way there...

Ok, what I'm trying to achieve is this: To have a form with various text fields, some are for input but a few would be calculating what values are entered into the forst text boxes, but this data should also be stored in the same table.

So, this is what i've done so far: I created a query with a few fields (1-4)from my table and another field that calculates these fields that looks like this.

IIF([name]>=2 And [department]>=1 And [role]<=5,"Yes","No"

I then created a form based on this query, I can now enter data into the text boxes for fields 1-3 and the text box that does the calculations works a treat.

The problem is getting the auto calculated value to be stored 'automatically' in the same table.

Can anyone advise, either an alternative to what I've done, or how I can get this field saved?

View 11 Replies View Related

Need To Integrate Form/ Query And Table

Sep 27, 2005

I am looking into making an interface for the data entry person. The data
entry person would fill in an ID. Now I would want certain information about
this person(with the ID) to show up, say Name info, Contact etc. Once it is confirmed that it is the right person, the data entry person would fill in some other fields (salary break up) and this would then be stored in a separate table.

As I understand, I can get the validation info from a query. But what
exactly should I be looking into to execute the autofill. Do I need to code
the "OnClick" property of the field 'ID' which is being specified ?

Secondly, after the data entry person specifies the salary break up, what
would make this info store the new data into the existing salary table ?

General guidelines would be highly appreciated. Currently I am looking into
basic VB, because I suspect that some coding might be required.

View 1 Replies View Related

Forms :: Query From Table To Form?

Mar 31, 2013

I've done a query with my equipment table for duplicates company names to get a number for my customer form for total number of equipment.

how can I get the number of duplicates for each company to be put into total number of equipment in my customer form?

View 6 Replies View Related

Append Query To Add Data From Form To Table

Mar 24, 2008

I understand that I can use an append query to add data to a table from a form and then have it run by using a command button. I want to do this because when I link the form directly to the table I do not want the form to create a new record every time it is invoked. (it does this automatically because I have visual basic code move to acNewRec and fill in some of the fields on load and lock them off, this is neccessary) I also do not want it to create the record immediately because the user might then decide to cancel their actions and leave the form - then I have half a record's worth of data in my tables! :D

I could just use VB and recordsets to do it but SQL is more elegant. The problem is, when I use the append query it appends an extra record to the table for every single record that already exists within it. So a table with 1500 records will have 1500 new entries containing duplicate data!

This is all a mess, so what would be a better approach? The user does not need to navigate through the records on this form or make edits, it's strictly for additions. There is a subform linked to a table that is in a one-to-many relationship with the table that the parent form must update to, but I'm quite happy to leave that one linked directly.

Any suggestions appreciated ;) I've probably done something thick..

View 1 Replies View Related

Display ADO Query Result In A Table Form

May 1, 2008

I would like to allow users create a query and then display the result in a new table. Just like the regular way in Access.

I know how to do it using DAO. However, I am working on a ADP, and want to use ADO for this. I cannot find a solution in ADO. So frustrated!

Any help is appreciated!

View 5 Replies View Related

Query Table Present Result In A Form

May 31, 2006

I have a form that contains 3 text boxes, 1 Combo Box and a Command Button

txtLastName
txtFirstName
txtDOB
cboGender
cmdFind

I want the user to be able to enter at least one of these criteria and
for a form to pop up with a list of individuals that match the criteria

example

user enters Male under cboGender and Young in txtLastName
a Form will pop-up that will give a list of user that match those criteria


LastName, FirstName, DOB and Gender data are stored in tblPatientDemo


Any ideas on how I can accomplish this goal??

View 3 Replies View Related

Two-table Query-Based Form Won't Allow Edits

Oct 2, 2006

Have the data settings for the form all allow=true
And tried the VBA allowedits=true on form open but the form is still locked.
Any suggestions about why?
Is updating two tables from a two-table query not allowed or???
Thanks,

View 1 Replies View Related

Multiple Item Form From Query To Table?

Jan 14, 2013

I am trying to augment my database to have a price list. Because I wanted the price list to be of record and saved, I used a form with a subform. The main form taking the price list header info price list ID, price area, and date and putting into tblPricelist) and using the sub form to table to load the actual price list info (product, price) and putting into tblpricelistsub.

What I am trying to do is to be able to bring the entire price list as it is and be able to update (or not) the price of all or some of the items and then have it save as a new entry into the tables. I am trying to do this without having to use a sub form and lookup every product all over again (500 products).

Is there a way to do a query to bring up the entire price list, turn that into a form, and then be able to update the prices that would in turn create another entry into the price list and pricelistsub tables?

View 13 Replies View Related

Updating Table Field Using Query Or Form?

Dec 23, 2014

I have a table holding clients data, I need it to work out the age of someone when an application is made, which I would like to be stored on said table. I have two fields [DOB] and [signed date], which I have used created a query with and an (unbooud?) field called age at application with the expression =DateDiff("yyyy",[DOB],[Date signed])

This works fine when I run the query, but I am unsure of the new next step of how to commit it to the table and even if that's possible.Ideally I would like this to run behind a form maybe using some click event after the [signed date] field has been entered.

View 5 Replies View Related

Selecting Existing Table Name Using Form's Combobox For A Query

Dec 12, 2006

Folks,
can someone help me on this? I am not sure why the select query inside this procedure is not working. Here is the that routine:

Public Sub temp()
Dim strDocName As String
Dim strTableName As String
Dim strTbl As String
Dim aot As Access.AccessObject
Dim strSQL As String
Dim rpt As Report
Set rpt = CreateReport

strTbl = Forms!frmSearchBoilerGuar!cboTypeOfGuar

For Each aot In CurrentData.AllTables
If aot.Name = "strTbl" Then
strTableName = strTbl
End If

Next aot

strSQL = "SELECT tblProjts1.chrProjectName, tblProjts1.chrBlrPropNum, " & _
"strTablename.memGuranItem , strTableName.memLDs FROM tblProjts1 " & _
"FROM tblProjts1 LEFT JOIN strTableName ON" & _
"tblProjts1.intProjectId = strTableName.intProjectId"

rpt.RecordSource = strSQL
strDocName = "rpt"

DoCmd.OpenReport strDocName, acPreview
End Sub


Basically, I am trying to select a table name from the combobox and then use that table name for my query. Then I want to use that query as a recordsource for my report.

Any help is greatly apprecited.

Shan.

View 2 Replies View Related

Designing Form But Table/query With Fields Not Enabled

Jun 29, 2005

im creating a form in design view but the icon to show the fields from the table that i want the fields to come from isnt being displayed; how do i get it to show?

View 2 Replies View Related

Can't Modify Fields In Form With Table INNER JOIN Query

Oct 5, 2004

Hello, exactly how Access 2002 and SQL operate is still a bit fuzzy to me.

In brief:
tableAccounts has fields for Signatory1ID and Signatory2ID, and other stuff
tableSignatories has ID for a primary key and has SignatoryTypeID as a field
tableSignatoryTypes has ID for a primary key and SignatoryType as a field

For each account, on a Form I want to show the Signatory and SignatoryType info for both signatory1 and signatory2. I have tried creating various queries and INNER JOINing the tables and/or queries together, but whenever I manage to get all the information displayed, none of it is editable. Access seems to lock the various text boxes and combo boxes.

Any thoughts?

View 2 Replies View Related

Forms :: How To Add A Search Box To Form Bound To Query Not A Table

Apr 17, 2015

I have a form based on a query. I'd like to add a search box to the top to look up values and then populate the rest of the form. I can't do it with the combo box wizard because the relevant (third) option doesn't show up, I assume that's because the form is based on a query not a table.

Any alternative method of adding a search?

View 4 Replies View Related

Forms :: Run Query From Continuous Form That References Table

Jan 31, 2014

I have a table called Tbl_Query_List that houses the query names that I want to be displayed on a continuos form. I want the user to select the query by highlighting it in the continious form and then having a command button at the bottom of the form.

I have everything setup including the command button. Assuming that on the EVENTS tab I set the OnClick to [Event Procedure] but when I click on the ellipsis what do I type to make it run the highlighted query?

View 10 Replies View Related

Forms :: Unretrieved Records From Table Via Query Form

Sep 11, 2013

I have a form that has the following fields: Ticket Date From, Ticket Date To, Pawnshop, Property Category, Item Description, Make, and Serial Number.

The purpose of this form is to allow an unexperienced user of Access to query a database. Thus far, when I specify the query to include dates from/to, pawnshop, property category (eg, jewelry), and item description (ring) the records retrieved are the correct number. None of these fields contain null values. However, the Make field has some null values and the Serial Number field has an extensive number of null values.

My problem is that I have noticed because the Make field has some null values a few number of records aren't retrieved after my query (even if I leave the Make field blank). This problem is much worse with the Serial Number field. For instance, I ran a basic query via my form specifying the dates and property category-jewelry and got back 229 records but when I verified this with a separate query I got 960 records, which is the correct number.

My criteria from my querry are as follows:

Between [Forms]![PawnProperty_PawnerQueryForm].[TicketDateFrom] And [Forms]![PawnProperty_PawnerQueryForm].[TicketDateTo]
[Forms]![PawnProperty_PawnerQueryForm].[PropertyCategory]
Like "*" & [Forms]![PawnProperty_PawnerQueryForm]![Pawnshop] & "*"
Like "*" & [Forms]![PawnProperty_PawnerQueryForm].[PropertyDescription] & "*"
Like "*" & [Forms]![PawnProperty_PawnerQueryForm].[Make] & "*"
Like "*" & [Forms]![PawnProperty_PawnerQueryForm].[SerialNumber] & "*"

The bottom two I've had to remove because the correct number of records were not being retrieved. I suspect that the null values in the Make and Serial Number fields are the root of the problem. to make these queries all work together!!

View 2 Replies View Related

Cannot Run Multi-table Parameter Query With Criteria Specified In Form

Dec 7, 2011

I've created a farm database, with a form (frmSearch) that will allow user to filter data. The form comprises of combo box and list box etc... for the user to input their own criteria. The subform below has a datasource. The data source is based on a query (qContractionSearch) which is basically a parameter query with 3 tables. The problem is, however, that it won't work with 3 tables... but will work if data source comprises just one table.

See the farm database attachment...and go to frmSearch...then go to Contraction tab. (The Cattle tab filter works fine-it only has a single-table datasource).i have a requery macro which runs whenever the user clicks 'search'.

View 3 Replies View Related

Queries :: Form Filtering And Creating Query - Move Top X To New Table

Jan 24, 2015

Tried to find things but being a mix of a couple of different actions havn't been able to actually find it

So basically I found a awesome form somewhere that builds the SQL query based on all the users selections.

When you hit the create button it will save the query and update the sub data sheet below with your query results.

From here the part I'm lost on is getting the TOP x number of records and moving them to a new table, I wanted it to work on the 2 drop down boxes that are on the form. select your values and hit the button.

I'd imagine it would be a sub query that I'd use for the top x like I have in the past but I just can't seem to get it to work

Quick steps

1. create your query
2. check your data in the sub datasheet
3. decide the number of records to move to the new table
4. select the name
5. hit the button

This would copy the ban, xcv & dfs fields from the importeddata table to the moverecordshere table & also update persname in the moverecordshere table with the name selected in the form.

Sample db attached ....

View 1 Replies View Related

Modules & VBA :: Using DSUM To Calculate Sum From Either A Table Or Query To Display On Form

Aug 24, 2013

I am trying to use dsum to calculate a sum from either a table or query to display on a form and this needs to be for different services within a period so I am using the following:

Code:
Me.txtTotalEarnings = DSum("Price", "KatiesPeriodTakings", "AppDate" >= CDate([Forms]! _&
[frmKatiesTakings]![txtStartDate]) And "AppDate" _&
<= CDate([Forms]![frmKatiesTakings]![txtEndDate]))

But I keep getting a mismatch error

The Query is called KatiesPeriodTakings
The field I want totalled is called Price
The date field is AppDate and the 2 controlling dates are the Startdate and EndDate from the Form

View 5 Replies View Related

Query A Table Using Multiple Values In Textbox On A Form - Not Working

Aug 7, 2013

I have a database in Microsoft access 2010. The database has a table that stores prospective customer records, and a form that is used to input a search criteria(s) via textboxes, which then queries prospective customers table and returns the records that contain the inputted search criteria(s).

An Example of Textboxes values on the search criteria form:
Textbox - name: bob
Textbox - address: Left blank
Textbox - category: car,boat,truck

I Have tried creating a query with the following

field: name
criteria: like “*” & name & “*”
field: address
criteria: like “*” & address & “*”
field: category
criteria: like “*” & category & “*”

SQL code:
SELECT customerName ,address,category
FROM prospectiveCustomers
WHERE customerName LIKE “*” & name & “*” AND address LIKE “*” & address& “*” AND category LIKE “*” & category& “*”;

That works, but only for one value in a textbox. Once there is more than one value in a textbox (e.g name: bob,smith), the query returns no records.

I have also tried splitting the values using the comma as a delimmter, then inserting the values into a new table. That is fine until one of the search criteria textboxes has been left blank. So the query I created will run, but returns no records.

SQL CODE:
SELECT prospectiveCustomers.name, prospectiveCustomers.address,prospectiveCustomers. category
FROM prospectiveCustomers, [SearchCriteria-name], [SearchCriteria-address],[SearchCriteria-category]
WHERE prospectiveCustomers.name Like [SearchCriteria-name].name AND prospectiveCustomers.address LIKE [SearchCriteria-address].address AND prospectiveCustomers.category LIKE [SearchCriteria-address].category;

View 2 Replies View Related

Forms :: Combo Box Query - Form That Searches A Table To Show Certain Criteria

Jul 21, 2014

I have created a form that searches a table to show certain criteria. I am having trouble with a part where the table uses a checkbox and I am trying to use a combo box on the search form to return the results based on is it checked? Yes/No or both. When I test it I keep getting Runtime error 3075 missing operator.

The sql I am using is below and when I try and see where it is going wrong it highlights the line.

Code : Me.Filter = strWhere

Code:
Private Sub cmdFilter_Click()
Dim strWhere As String
Dim lngLen As Long
Const conJetDate = "#dd/mm/yyyy#"

[Code] .....

View 1 Replies View Related

Forms :: Combobox On Navigation Form Header - Query Table To Show Right Info

Mar 24, 2013

I created a navigation form on which I put a form call [frmAnimal Setup].

I then placed one combo box on the Navigation frm Header. I have bound it to its source and it actually queries the tbl and show the right info. However when I select one, it will not let me.

In addition, [frmanimal setup] will not allow me to select a breed although it does query the tbl and shows the right information.

View 1 Replies View Related

DLookup - Using Two Form Fields (Number And Drop Down Text) To Query Table For Data

May 29, 2015

Having problems getting dlookup to work in the control source field of a text box.

My form has fields : Catalog # (numeric value) and Country (drop down text selection).

I would like to query a table CatNameList for a name (text) if the catalog # and country find a match on the table.
My field names on the CatNameList table are : Name, Number (to validate against the Catalog # entered on the form) and CName (to validate against the Country drop down on the form).

I am successfully able to populate the name from the CatNameList table on my form using lookup of the catalog # using this :

=DLookUp("Name","CatNameList","Number = Form![Catalog #]")

However, I will eventually have several catalog numbers that will be identical in the table CatNameList, thus why the country is important as the second criteria to be added into the dlookup.

I have tried for a few hours unsuccessfully to add the second portion to my dlookup.

This is what I have currently (not working) that I have been playing with, I'm sure I'm missing a quote mark, & or something simple.

=DLookUp("Name", "CatNameList", "Number = Form![Catalog #] And CName = ‘”& Form![Country] & ”’”)

View 14 Replies View Related

Query Returns Results From One Table/query But Not From Other Table/query

Mar 2, 2007

Advanced apologies for the long question.

I have a table providing a list of all members of a local bowling club, with the following fields - MemID, MemName (table is tblMembers)

I also have two more tables providing details of matches we play in a local bowling league. The first table holds the basic match information (called tblMatches) - MatchID, Date, Opponents, ScoreFor, ScoreOpps. I've used a MatchID field as more than 1 match can be played on a single date.

The other table provides details of who played in what match and on what bowling rink and is called tblMatchDetails, with the following fields - MatchID, MemID, Rink (numeric), Result (numeric - 1 for win, 0 for loss). Each match uses different rinks, and not all rinks are used in a match, however, each rink can only be used once in a match.

We have 10 rinks, and I was looking to see if I could get a table to show me the match details along with the rinks in numerical order with who played on them in what match and their result.

For example:

Field Row: Date - Opponents - ScoreFor - ScoreAgainst - Rink 1 Player - Rink 1 Result - Rink 2 player - Rink 2 result - [and son on upto] - Rink 10 player - Rink 10 result.
Row 1: 01/01/2005 - Example BC - 4 - 3 - [blank] - [blank] - Fred - 1, etc
Row 2: 08/01/2005 - Other BC - 5 - 2 - John - 0 - [blank] - [blank], etc

I produced a query for each rink in turn which looked in tblMatchDetails and provided the following (the queries are called qryRinkOneDets - or whatever rink numebr was used):

MatchID - PlayerID with a criteria field of rink = "1" or whatever number rink it is for.

I then produced a second query providing a link of the matches (tblMatches) and the rink queries (qryRinkOneDets, etc), with the joins between the MatchID fields in tblMatches and the individual queries to provide every record from tblMatches and only those records from qryRinkOneDets where MatchID was equal.

However, the results I got only showed the match details and no info from the Rink query. If I change the join from RIGHT to LEFT, then I get the records from the Rink query but not from the Matches table. If I then do a join where only the MatchID's from the table and query are equal (an INNER join) then I get no records at all.

Can anyone figure out what I'm doing wrong?

Many thanks in advance

View 3 Replies View Related

Queries :: Filter Data From A Table Using Query (from Data Input Form)

Dec 30, 2014

I would like to filter data from a table using a query (from an data input form). The objective is to output all results if input form field is empty and to output results higher or equal to the type in the field if field is not Null. The query code is as follows:

IIf(IsNull([Forms]![Form2]![MaxDiffInput]);[Maximum operational pressure (bar)];[Maximum operational pressure (bar)]>=[Forms]![Form2]![MaxDiffInput])

However, is not providing any result when the input field (MaxDiffInput) as a value.

View 5 Replies View Related

Queries :: DSum - Update A Field In Specific Table With Info Form Another Table

Aug 5, 2014

I have a table products with a field "id_product" and "total" (Total items in stock)

I have a query with the fields "id_product" and also the field "total in stock"

I want an update query to update the field 'total' in table 'products' with infos from that query

For each id-product in table products, replace the field total with the field 'total in stock' from the query

So I want to update a filed in a specific table with infos form another table.

View 2 Replies View Related







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