Locking A Table Based On Query Results

Aug 24, 2006

I have a query that checks an expiration date field and displays the word "Expired" in another field if applicable. This query is used to look up items, then the user would enter whether or not it is approved right in the resulting data grid thereby entering that approval into the table being used for the query. Can I do something with the query so that if the item returned has expired, a user would not be able to enter anything into the approval field? Something like, if field1 = "expired" then lock the table? I can't use a form, I have to just do it in the basic query or forget it. I would very much appreciate any suggestions!

View Replies


ADVERTISEMENT

Tables :: Summation Of Fields In A Table Based On Query Results

Nov 5, 2013

I have a form that users can input data into and based on that data it runs a query and generates a report. These reports can be different based on user entered data on the form. My issue is within the report I would like to sum certain fields. The problem with trying to sum theses fields is that they show up on each row so I have hidden duplicates but when trying to sum the field it still trys to count the hidden duplicates thus giving a value that is of no use.

I have tried many methods to sum but one of the problems I continue to run into when I create a text box and build an equation and reference the field I would like to sum is when the report runs it is asking for a value to be entered for the field I am attempting to sum. I shouldn't need to enter a value as I am trying to obtain the value.

View 13 Replies View Related

Locking Records Based On A Value In Another Table

Aug 30, 2005

Hi,

I am working on a test equipment database project. Please could you help with a problem I am having.

I want to be able to lock out records on 1 form based on whether 1 field of its data is found in another table

Any ideas and suggestions would be welcome

Thanks :)

View 1 Replies View Related

Autofill Fields Based On Results From Another Field In The Table?

Apr 18, 2007

I have an Access database with several tables and a multitude of subforms which are displayed on a single master form. The subforms are used to facilitate data entry. In several of the tables there are fields which are related and I would like to have some of these fields updated based on the results entered in the related field (i.e. the answer for one field depends on the other).
Field 1Field 2
[facing][DISC_CODE]
un3
up1
dn2

Field 1 is a simply a description of the basic dataset. This field is already set-up on form as a combo box that allows the user to choose one of three options. Field 2 is a code number used by another piece of software to identify a particular symbol. It is a new field being added to the database. There are 200 codes that identify a wide range of symbols for different types of data and I don’t want to have to look them up when I, or my assistants, are doing data entry.

My question is this; is there anyway to have the DISC_CODE value, Field 2, automatically entered in the table when the value for Field 1 is selected in the combo box on the form?

View 1 Replies View Related

Tables :: Limit Combo Box Results Based On Secondary Table

Dec 4, 2013

I have a DB with 4 tables:

Property (used for look-up values)
Service Type (used for look-up values)
Rate Table (uses the Property Table and Service Type Table and is used as a rate look-up table for the daily service table noted below)
Daily Service

Using the Daily Service table, I need to choose a property, choose a service type that is limited to the property (100's of service types, but a property may only have a limited number), and enter a quantity, and have the Rate Table return the specific cost of the service. I didn't think this was too hard in Access (2013), but I seem to be hitting a wall and spending too much time figuring it out. Now I am behind in my project.

I have been trying to do this in a table format, but have been unsuccessful in limiting the results of the Service Type combo box based on the property chosen.

View 2 Replies View Related

Query Results Based On UserID

Apr 17, 2008

Hello,

I have a query (used in a combox) with a field called "UserID" and in the query I would like to have the UserID field get it's criteria from the "User" field on a hidden form.

I have it for the most part however, I have two users (myself and another) that when we use the combo box we se "All" the records in the query.
I was thinking something like:

IIf([Forms]![frmUser]![user]= [User],true, "*")


I hope this makes sense.

Thank you

View 2 Replies View Related

Queries :: Update A Query Based On Results From Another Query Using Count Function

Apr 2, 2013

I run a physical therapy office and patients come in for treatment either 3, 4 or 5 times per week. My database is used to track these frequencies (among other things).

I have 3 queries which count how many patients come in 5, 4 and 3 times/week.

In my main table I have fields called "how many 5's", "how many 4's" and "how many 3's".

I have tried to design an update query which will update those fileds in my main table to reflect the counts in the 3 queries mentioned above.

(I'm not using SQL view, I'm using the query design view)

In the "update to:" row, I use the Build function and locate the count I'm looking for.

Problem: when I run the query I get the error: Operation must use an updateable query.

View 3 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

Self Generating Query String Based On Query Results?

Jan 3, 2008

Here's my problem. I need to generate a report that says how much of each individual product was produced and as well as the total produced for a specified category in a time period. Something like the following:

05 Catagory A: 02 Product AA, 01 Product AB, 02 Product AC
10 Category B: 07 Product BA, 03 Product BB
04 Category C: 01 Product CA, 01 Product CB, 01 Product CC, 01 Product CD

etc...

I currently have a query that queries a database and pulls out all products that were produced in a specified period and the categories they belong to and dump them into a local access table. Now what I need to do is search through the query results and count up how many of each product were produced (02 AA, 01 AB, etc...) and the totals for each category. The number of categories is pretty limited (6), but there are hundreds of product codes, so I need a way to do this without having to type in each induvidual product code as the requirement by which the query searches. Also, the product codes that get returned are different every day.

I was thinking something along the lines of take the product code of the first row and check for any others in the results that match and write that into another table. Then move onto row 2 and use its product code as a search parameter and search through the query results for any matches. Then continue that until the end of the query results. Can I do that? Is there a better way to achieve what I need?

View 7 Replies View Related

Queries :: Query Results Based On 2 Form Control Values

Oct 29, 2014

I have 2 form controls one a combobox and the other a text box. The text box select the site (txtLocation) where the user can enter part of the name of the site and all sites with those characters are returned. I've done this by adding:

Code:
Like [Forms]![frmSearchDB2]![txtLocation] & "*"

into the criteria on the Site field in the query design editor.I also want the combobox to have an affect on the query. I want it to query on user status. However if the combobox reads "All Users" I want it to return all status's and all null values. In the criteria field I put:

Code:
iif([Forms]![frmSearchDB2]![cbxUserStatus] = "All Users",like "*",[Forms]![frmSearchDB2]![cbxUserStatus])

It kind of works but no null values are pulled back. Should it be an expression?Do I need to do it in VBA?

View 1 Replies View Related

Forms :: Generate Custom Form Based On Query Results

Dec 11, 2013

I'm trying to track daily production at a manufacturing company running many different processes at different locations each running multiple parallel "lines." The tricky part is that the number of lines running and the shift schedules e.g. 2shifts 10hrs/day 4days/week or 3shifts 8hrs/day 5days/week change frequently for each process.

Right now I have a form for process data that specifies the schedule and number of lines running each day. Then I'm running an append query to a "production" table that generates blank production records associated with each item made in each process for the correct shift/line combinations.

Up to now I've been manually changing the date on the append query each time I run it. Then I have a seperate query for each process that pulls out the production records for each day. My problem is that the preferred interface for production data entry is a spreadsheet with the following layout:

--------DAYS LINE 1 DAYS LINE 2 SWING LINE 1 SWING LINE 2
ITEM 1 100
ITEM 2 2250
ITEM 3

which changes each time the shift/line schedule changes for each process. The only way to achieve this layout I know of is a crosstab query which isn't updateable. Ideally, each day the manager will specify the shift schedules and forms will be automatically generated with the correct structure and sent to the process supervisors. I'm open to different form layouts and even redesigning the database completely.

View 2 Replies View Related

Forms :: Sending Email From A Form Based On Query Results

Apr 1, 2014

I have got a form (name: SearchForm) that displays results of a query (name: AircraftSearch). It is a continuous form displaying multiple results of a search done by the query. I need to be able to send an e-mail to multiple recipients chosen from results displayed on the form.

One of the form's field (a text box called: EmailToOperator) is containing e-mail address to an aircraft operator selected by the underlying query. I need to be able to place a check box button (or something similar) that is going to select the e-mail address. The tricky part is to have multiple check boxes allocated for each record displayed on the form and have them working independently.

The second task is sending a one message (via Microsoft Outlook 2010) to chosen multiple recipients (with no attachments) having the recipients' addresses not visible to each other.

View 7 Replies View Related

Change Field Background Color Based On Query Results

Jun 24, 2014

I would like to change the background color of a field that is the result of a Unique Values query. I am trying to get a list of invoices where all the line items are approved. I can't seem to get it to work the way I want because if even one invoice line item is approved it will show up as approved.

Is there a way to change the background color of the invoice field to red if ANY of the Approved line items are = False

View 7 Replies View Related

Queries :: Parameter Query Returning Incorrect Results Based On Checkbox

Jul 31, 2013

I have a parameter query that contains information on a list of people and contains 3 checkboxes: alumni, parent, business

In this query, I am trying to use parameters to filter the results based on these three fields i.e.

true, false, true would return all records where either alumni, business or both are true, and parent can be either true or false.

false, true, false would return all records where only parent is true, and the other fields do not matter.

View 2 Replies View Related

Get Results From Query Into Table

Aug 30, 2005

This is a rael daft question, but how do I get the results of a query into a table?

View 5 Replies View Related

How Put Results Of The Query Into The Table

Oct 13, 2005

Hi!
I have query with one column results
How to put automatically results of this query into one column table
Thank's a lot

View 1 Replies View Related

UPDATE Table From Query Results?

Jun 9, 2006

Alright, i'm almost sure this isn't the best way of doing this,

But i wanna build a scoring system out of three criteria. cost, delivery, and qaulity. I have those tables built along with a contact table where there over all score will be tallied up. Each contact can have more than one entry in the criteria.

So what I did was i built a query to make a new table for each contact to generate the score and the contact id, then using that ID, i update it to the contact table using the UPDATE function...however wheni have 3 criteria, and 400 contacts..this obviously becomes painfully slow.

The question is, is there a way to directly pull the sql query results (summing the total of each contacts score for each criteria), then storing it into the contact table without making a new table in the process?

View 1 Replies View Related

Use Query Results From Report To Make Table

Aug 2, 2006

Hello,

I have a query that prompts the user for input to generate a report.
I would like to in essence copy that same record set and append it to a different table (archive table).

Not quite sure how to go about it.

Thank you

View 5 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 :: Use Query Results To Fill In Records In Another Table

Aug 18, 2015

I have a query that outputs results like:

Company ID | Data A | Data B | Data C

101 | results |results |results
102 |results |results |results
103 |results |results |results
104 |results |results |results
105 |results |results |results

In another Table containing additional company information, I have the primary key as the company ID, and I want to make the query that outputs the above table, auto-fill the blank fields in the existing Company information with the same headings as Data ABC etc.

However, I don't want the query to add full new records (which I think is the Append Query?), instead I want the existing company records have additional fields (Data ABC) added, with information from the Query added.

View 1 Replies View Related

Locking Table

Aug 7, 2007

How Can You Lock Table Or Form So Nobody Can Accidently Delete It Or Alter It Unless Person With Permission?

View 1 Replies View Related

Table Locking

Dec 18, 2006

I have a single table app with a form. The form pretty much just displays the data that is in the table in a more user friendly view. Right now when a user enters data into the form it automatically adds it to the table. What I want is for the table to not be updated until the user clicks a Save button. Can anyone tell me how to do this?

View 4 Replies View Related

Forms :: Binding Results Of Query To Textbox Then Writing Value To Table?

May 19, 2015

Basically, I originally wanted to create a form which I can input data into Access with by using a button (I was unable to get Access to append the information from the forms to the table, so it didn't work out!). I did not want the fields on the form to be linked to a table, as then a record (and most importantly an auto-number) is created as soon as somebody starts typing. Should somebody stop typing halfway through and quit the form an autonumber will have been generated, which makes the number of "users" seem higher than it actually is. I got around this by changing the field from autonumber to number and then creating a query that selects the maximum value of ID in the table, then adds 1 to it (which is essentially the lowest unique number. I tend to call this newID).

The problem I now have is setting this to be written to the table alongside the data from the form (the rest of the fields on the form are now connected to the table, as I am no longer using an autonumber). I have tried the following: Setting the form to run the expression "[ID] = [qryMaximumUserID]![NewID] " on load. This returns the error "The object doesn't contain the Automation object 'qryMaximumUserID.' Setting the control source of the text box to be dLookup. This fills the textbox with the correct value, but then it doesn't write it to the table! Setting the default value of the field to be 0, then running an update query to update any ID of 0 (criteria "0" to the value of newID "update to: [qryMaximumUserID].[NewID]. "). However this doesn't work as whenever the query is run it asks for a parameter to be entered, rather than just taking the value from the other query. Writing a macro that is run on load to SetValue of item:[ID] to expression: [Forms]![qryMaximumUserID]![NewID]. However this returns an error "Microsoft Access cannot find the referenced form 'qryMaximumUserID' you entered in the expression.

View 4 Replies View Related

Modules & VBA :: ADO With SQL To Add Append Query Results To Excel 2007 Table

Oct 16, 2014

I have successfully used VBA to populate select query results into an excel worksheet on open, for a co-worker. Now I am trying to populate the records from an append query to the bottom of those results, which are now in a table on an excel spreadsheet, Contractor EIF. I am trying to make this work because my co-worker modifies the results in the table, deleting rows, adding fill color etc. and as new projects begin he would like those added to the projects already in the table (without rewriting the entire table).

Private Sub Window_Open()
Dim strDB As String
Dim strMyPath As String
Dim strDBName As String

[code]....

View 2 Replies View Related

Modules & VBA :: Send Query Results In Table In Body Of Email

May 24, 2014

I have created some code to get the records of a query and it puts them in the body of the email but it doesn't format it well for example the email looks like

James | halliwell | 31
Leanne | smith |27
Alexis | smith |8

I would like it to be in a table is this possible,

Code:
Public Function SendEmail()
Dim MyDB As DAO.Database
Dim rst As DAO.Recordset
Set MyDB = CurrentDb

[Code] .....

View 3 Replies View Related

Locking Fields In A Table

Feb 15, 2006

How do you go about locking certain fields in a table, so that data can only be input to them via the form?? I have a few tick boxes set up, and i want them to changed only in the form, as they can only be ticked under certain circumstances which aren't setup in the table.

View 1 Replies View Related







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