Paramter Update to query

I have a table called 'temp_table' this table has a column named 'month_year' 
and I would like to know how can I create a query where I can just update 
that table with the month and year.  So I want to be able to click on the 
query and it will ask me to put in the month and year and it will 
automatically update that field in that table. Can this be done and how?
0
Utf
1/9/2008 8:15:01 PM
access.queries 6343 articles. 1 followers. Follow

5 Replies
498 Views

Similar Articles

[PageSpeed] 34

On Wed, 9 Jan 2008 12:15:01 -0800, jac007 <jac007@discussions.microsoft.com>
wrote:

>I have a table called 'temp_table' this table has a column named 'month_year' 
>and I would like to know how can I create a query where I can just update 
>that table with the month and year.  So I want to be able to click on the 
>query and it will ask me to put in the month and year and it will 
>automatically update that field in that table. Can this be done and how?

What's the datatype and appearnce of the month_year field? Is it a date/time
field? If so, it must contain a complete date with the day; you can use a
format such as yyyy-mm to just DISPLAY the year and month but it stores a day
(perhaps the 1st). Do you want to update all rows in the table? Just add a new
row? update a specific row?

More info please!

             John W. Vinson [MVP]
0
John
1/10/2008 6:43:25 AM
The field is a number type and only can be 4 numbers. So when the query is 
created i wanted to prompt me, "what numbers?" that way I just put "0108" and 
it will only get that data.

"John W. Vinson" wrote:

> On Wed, 9 Jan 2008 12:15:01 -0800, jac007 <jac007@discussions.microsoft.com>
> wrote:
> 
> >I have a table called 'temp_table' this table has a column named 'month_year' 
> >and I would like to know how can I create a query where I can just update 
> >that table with the month and year.  So I want to be able to click on the 
> >query and it will ask me to put in the month and year and it will 
> >automatically update that field in that table. Can this be done and how?
> 
> What's the datatype and appearnce of the month_year field? Is it a date/time
> field? If so, it must contain a complete date with the day; you can use a
> format such as yyyy-mm to just DISPLAY the year and month but it stores a day
> (perhaps the 1st). Do you want to update all rows in the table? Just add a new
> row? update a specific row?
> 
> More info please!
> 
>              John W. Vinson [MVP]
> 
0
Utf
1/10/2008 3:31:07 PM
On Thu, 10 Jan 2008 07:31:07 -0800, jac007 <jac007@discussions.microsoft.com>
wrote:

>The field is a number type and only can be 4 numbers. So when the query is 
>created i wanted to prompt me, "what numbers?" that way I just put "0108" and 
>it will only get that data.
>
>"John W. Vinson" wrote:
>
>> On Wed, 9 Jan 2008 12:15:01 -0800, jac007 <jac007@discussions.microsoft.com>
>> wrote:
>> 
>> >I have a table called 'temp_table' this table has a column named 'month_year' 
>> >and I would like to know how can I create a query where I can just update 
>> >that table with the month and year.  So I want to be able to click on the 
>> >query and it will ask me to put in the month and year and it will 
>> >automatically update that field in that table. Can this be done and how?
>> 
>> What's the datatype and appearnce of the month_year field? Is it a date/time
>> field? If so, it must contain a complete date with the day; you can use a
>> format such as yyyy-mm to just DISPLAY the year and month but it stores a day
>> (perhaps the 1st). Do you want to update all rows in the table? Just add a new
>> row? update a specific row?
>> 
>> More info please!

Again:

Your question is ambiguous.

Do you want a prompt "what numbers?", and have the user type 108 (or
equivalently 0108) and find all the existing records in that table?

Or do you want the user to type 108 and have it update all rows in the table
to 108?

Or do you want to update only a subset of the rows to 108?

Or do you want to create a new record in the table with 108?

Or do you want newly added records to automatically fill in the current month
and year?

Any of these could be valid interpretations of your question.

             John W. Vinson [MVP]
0
John
1/10/2008 5:10:58 PM
> Or do you want the user to type 108 and have it update all rows in the table
> to 108?
That is what I would like.

"John W. Vinson" wrote:

> On Thu, 10 Jan 2008 07:31:07 -0800, jac007 <jac007@discussions.microsoft.com>
> wrote:
> 
> >The field is a number type and only can be 4 numbers. So when the query is 
> >created i wanted to prompt me, "what numbers?" that way I just put "0108" and 
> >it will only get that data.
> >
> >"John W. Vinson" wrote:
> >
> >> On Wed, 9 Jan 2008 12:15:01 -0800, jac007 <jac007@discussions.microsoft.com>
> >> wrote:
> >> 
> >> >I have a table called 'temp_table' this table has a column named 'month_year' 
> >> >and I would like to know how can I create a query where I can just update 
> >> >that table with the month and year.  So I want to be able to click on the 
> >> >query and it will ask me to put in the month and year and it will 
> >> >automatically update that field in that table. Can this be done and how?
> >> 
> >> What's the datatype and appearnce of the month_year field? Is it a date/time
> >> field? If so, it must contain a complete date with the day; you can use a
> >> format such as yyyy-mm to just DISPLAY the year and month but it stores a day
> >> (perhaps the 1st). Do you want to update all rows in the table? Just add a new
> >> row? update a specific row?
> >> 
> >> More info please!
> 
> Again:
> 
> Your question is ambiguous.
> 
> Do you want a prompt "what numbers?", and have the user type 108 (or
> equivalently 0108) and find all the existing records in that table?
> 
> Or do you want the user to type 108 and have it update all rows in the table
> to 108?
> 
> Or do you want to update only a subset of the rows to 108?
> 
> Or do you want to create a new record in the table with 108?
> 
> Or do you want newly added records to automatically fill in the current month
> and year?
> 
> Any of these could be valid interpretations of your question.
> 
>              John W. Vinson [MVP]
> 
0
Utf
1/10/2008 5:36:01 PM
On Thu, 10 Jan 2008 09:36:01 -0800, jac007 <jac007@discussions.microsoft.com>
wrote:

>> Or do you want the user to type 108 and have it update all rows in the table
>> to 108?
>That is what I would like.

UPDATE temp_table SET Month_Year = [Enter month and year, e.g. 0508 for May
2008:]


             John W. Vinson [MVP]
0
John
1/10/2008 8:20:57 PM
Reply:

Similar Artilces:

Update
What is Happening? This message is to inform you that Microsoft will soon begin discontinuing newsgroups and transitioning users to Microsoft forums. Why? As you may know, newsgroups have existed for many years now; however, the traffic in the Microsoft newsgroups has been steadily decreasing for the past several years while customers and participants are increasingly finding solutions in the forums on Microsoft properties and third party sites. This move will unify the customer experience, centralize content, make it easier for active contributors to retain their influence, mitiga...

Chart update automatically
Sometimes I start a data list to chart, create a chart then add data and the chart automatically updates as I add to the data list. The X axis grows with each entry. Other times, I do what I think is the same thing but the chart lays dormant. I actually have to manually update the series range. Nothing I do seems to make it "automatic". Is there a way to make any chart (new or existing) update automatically when dynamic data is involved? Hi, The chart will update automatically if, - you based the chart on a List (Table in xl2007) - created and used a dynamic named range - i...

update worksheet in one file with worksheet in another file
I want to have one worksheet in one of my excel files (file 1) to reflect the contents of a worksheet in another file (file 2) every time it is opened (file 1), that is, everytime it is opened this one tab should reflect the last changes made on the tab in another file, including formating. I suspect this is possible but I don't have a clue how to do it. I have a few questions: Can this be done without VBA? (I'm not even a beginner with VBA!) I did search the web some and found the following that looks interesting: http://techrepublic.com.com/5208-6230-0.html?forumID=101&threadI...

80070490 Error: Windows update encountered an unknown error 03-04-10
3 security updates will not complete (now 4). Error Code 80070490 02-Mar-10 I am unable to do these three security updates: KB970238(release date 6/9/09), KB97451(release date 10/13/09), KB954155(release date 10/13/09), & KB975517(release date 10/13/09). The last succesful update was KB9937286 on 2/27/2010 I have a Compaq Presario PC: SR5214X. OS Name Microsoft® Windows Vista™ Home Basic Version 6.0.6002 Service Pack 2 Build 6002 OS Manufacturer Microsoft Corporation System Manufacturer Compaq-Presario System Model GV441AA-ABA SR5214X System Type X86-based PC ...

Query emails coming to a specific domain
Hello; We have about 5 domains on our exchange server that we receive email from. We are in the process of not renewing one of our domains but would like to check to see if email from that domain is still coming through. Is there any way to do that? I tried the Message Tracking Center with the *.domain.com but it didn't like that. It wanted a specific user. Thanks Check SMTP logs as well. -- Bharat Suneja MVP - Exchange www.zenprise.com NEW blog location: www.exchangepedia.com/blog ---------------------------------------------- <nospam@newsgroup.com> wrote in message news:...

combo box list updating
Hi - I would like my combo box list to change base on the value of A1. That is, I have its input range being B1:F1 - "Year 1", " Year 2" etc. Example: -If cell A1 is the value "10" then the combo box default list item would be "Year 1" (which is cell "B1") -If cell A1 is the value "20" then the combo box default list item would be "Year 2" (which is cell "C1") ETC... Thanks for your help - Jim A ...

User Entity
Hi, I was wondering how others keep the User records in CRM updated with the Active Directory information like phone numbers, etc. Has anyone written a Windows Script to take this action or are you using other methods? Thank you ...

Automatically updating cells on other worksheets when data typed into primary sheet
I'm trying to create a workbook that will allow me to enter data on the first sheet and it will then append the data to a second sheet by automatically starting a new line. Example: I enter "This is a test" into A1 on sheet 1 First available line on sheet2 automatically updates with "This is a test" When it comes to enter something new in A1 on sheet1, same function above goes into action, accept it should be on the next available line which will be A2 on sheet2, as A1 is already used by previous data entry. Can this be done? I would appreciate any help with this. ...

query to make a list of products based on delivery history
I have a table which lists all deliveries made of our product. From this table, I'd like to make a list of all products. My problem is the products will have many duplicates as they can be ordered multiple times and I just want a list showing all the individual products that we offer. -- TIA Try something like: SELECT DISTINCT [our product] FROM [which list all deliveries made]; If you can't figure this out, come back with table and field names. -- Duane Hookom Microsoft Access MVP If I have helped you, please help me by donating to UCP http://www.access.hookom.net/UCP/Def...

Update Query based on Current Recordset
I have a continuous form with filtered records. I want to run an update query on a field in a table based on the current filtered records on the form. What code would I use to accomplish this task? Any help appreciated in getting me started. NEWER USER, Without a wee bit more information, like what are you trying to update, field names, table names, do you want this attached to a button or an event, etc... The best I can do is... UPDATE SomeTable SET SomeTable.SomeField= WhateverValue WHERE (((SomeTable.SomeOtherFied)=WhateverValue)); Of course, the above would be an ...

Printing updated customer information on a Receipt
Hello all, I modified the receipt to print the customer's total number of visits and total amount spent (both from the customer record) at the bottom of the receipt. The problem is that it is always printing the values as they stand before the last transaction. Example: if I create a new customer, do a tranaction ($20) and print the receipt, the number of visits and amount spent will show as zero. When I do a second transaction the receipt will print the values (visits 1, amount spent $20) as they stand at the end of the first transaction. Does anyone know how I can force the receip...

Updating item properties.
We want to change the commission properties for items in our database, with different commission rate for different as below: Men’s Clothing – 2% Women’s Clothing – 2% Men’s Accessories – 1% Men’s Accessories – 1% And this will be a percent of sale. Is this done with an update query? It can be done with an SQL update query. How do you know if an item is men's acc... ? "Davidjc52" <Davidjc52@discussions.microsoft.com> wrote in message news:C57AEFC9-2DEC-46C7-AD96-EE950322155E@microsoft.com... > We want to change the commission properties for items in our database...

IIF Query for Numeric Values in Text Field
I’m attempting to flag interest rate spread errors and omissions in a file from a sales database using IIF statements I adapted from another database (I’m a novice at this). The field I’m querying is text format and contains both alpha and numeric values. When I test for a null value the IIF works fine, but when I test for a numeric value I get an #ERROR. Spread Error1: IIf(([Tbl 1 Eligible Closed Deposit Opps Appended]!Spread Is Null),1,0) Spread Error2: IIf(([CCC Fall 2007 Eligible Products]![IB/NIB]="NIB" And [Tbl 1 Eligible Closed Deposit Opps Appended]!Spread<4),1,0...

Insert query with two left outer joins gives "Record is Deleted" m
Hi, I have built an insert query to combine data from 3 tables into one table based on a key value (RA_ID) on a form. Two of the from tables may or may not have data associated with the main from table. So I have coded the select from statement using left outer joins. When I run the query with a row in the first child table but not in the second it works fine but when I run the query with a key value that exists in the 2nd child table but not in the first I get a message saying "record is deleted". Anybody have any ideas what is causing this? Here is the query......... ...

after updated data is was missing encoding
In ASP after updating data (with ADO) in Access data is missing displayed in incorrect encoding. Please help me. Vusal Hamidov ...

Default Reply Address/Recipient Update Policy
I have an Exchange 2003 setup on an SBS 2003 server. All users have been created. When I use AD Users and Computers to change one user's default reply address to something other than the alias, it gets changed back automatically. I understand that on user creation, this is what it uses. But, it has always been my understanding that once the user has been created, you can then change on a user basis. I have users in the company that use initials as email, some that use firstinitial/lastname and some that use full name. I have at least 10 other Exchange servers (3 of those being 2000)...

table doesn't update until after I press the escape key
I have a form with subform working but with one issue - when I enter data into a row I start on the next row, but get error about duplicate key. I press the escape key, it clears the data I just tried inputing, and it updates the key field. The key field causing the error uses this in the default value property field- =Nz(DMax("SongID","MusicOnPC_Songs"),0)+1 Is there something missing to make it update after I tab out of the last field for that row, and move into the next row? try removing the expression from the DefaultValue property of the SongID field. instead, ...

Can I add and update a reference number
I would like to add column at the beginning (left most) of a sheet whic would serve as a reference number, i.e. 1, 2, 3, ..., n, to identify row. I don't want to use the Row and column headings check box under pag setup because that numbers from the very first row, and there are rows used for titles on every page. I would like this to automatically get updated if I insert a row an add data or if I add data after the current last row. Is there an option I can use or a function I can create? Thank you, Pete -- Message posted from http://www.ExcelForum.com It depends on exactly what you ...

Update 12.2.0 Failure
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I am running snow leopard 10.6.1 and whenever I update office 2008 to 12.2.0 it fails and office stops working. I followed the CompuFor instructions on updating and these do work for me either. It might be worth mentioning I could not find these files: <br> OS Drive\Library\Applications\Microsoft Office 2008 <br> OS Drive\Library\Preferences\com.microsoft.* <br> OS Drive \Library\Preferences\Microsoft <br> OS Drive\Users\your_account\Library\Application Support\CrashReporter\Intervals...

Year end tax updates
When are you going to get the website fixed so we can get the year-end tax updates? We must install these next week or we have a serious problem. If not available on the website, what are the alternate means of obtaining them? -- DoLu Yes, this seems to happen every year. We needed the updates and INFORMATION about the updates this week. Are there static links? "DoLu" wrote: > When are you going to get the website fixed so we can get the year-end tax > updates? We must install these next week or we have a serious problem. If > not available on the website, what ...

updating accessmode in UI throws error
I'm using a fresh install of CRM 4.0 90-day trial. If I log in as a user with the "System Administrator" role and attempt to adjust a user's access mode / CAL I receive the following error: "The logged-on user does not have the appropriate security permissions to view these records or perform the specific action." I'm able to adjust roles, add users, disable users, edit other properties of the user, etc. I'm just unable to adjust the CAL level of the user once the user has been added. If I try the same thing via code: systemuser updateu...

Postpone subform query in tabbed control
I have a form containing a tabbed control. One tab in the tab control contains a subform loaded from a query. As I understand it, every time I page from row to row on the main form, the query in the subform runs. I dont want the query to run until the tab is accessed. If I happen to be on the tab, I do want it to run. Hope this makes sensnse. Is this possible? ...

Update
What is Happening? This message is to inform you that Microsoft will soon begin discontinuing newsgroups and transitioning users to Microsoft forums. Why? As you may know, newsgroups have existed for many years now; however, the traffic in the Microsoft newsgroups has been steadily decreasing for the past several years while customers and participants are increasingly finding solutions in the forums on Microsoft properties and third party sites. This move will unify the customer experience, centralize content, make it easier for active contributors to retain their influence, miti...

ETF
Several ETF's in my portfolio are refusing to update today, even well after market closed. At same time noticed money had dropped some of my etf symbols as well and had to re-enter. ETFs include VEIEX, TIP, BND. Also several Vanguard mutual funds not updating, mostly bond funds. All else ok and if I click through to quote detail end up at right place on Money Central. Anyone else seeing this behavior? "gcraig" <gcraig@discussions.microsoft.com> wrote in message news:3099BE67-F7B0-446A-87F3-79D76D03E06D@microsoft.com... > Several ETF's in my portfolio are ref...

Using Option Buttons to Modify a Query
I have a form with a subform that uses a Query as its 'Source Object'. On the form there are 6 Option Buttons that I would like to use to modify the Query Criteria. Each button would have a unique value (A, C, E, H, P, or X), the Query Criteria would be modified to use from 0 (no Criteria => all records) through 6 buttons (all Criteria => all records). I also have 6 other buttons that I would like to use to sort the query but if somebody can tell me how to do the above I may be able to figure it out on my own. Thanx Geoff Here a couple of ways -- SELECT EMP.EM...