Go Back   Access World Forums > Microsoft Access Discussion > Queries

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 05-29-2007, 04:04 AM   #1
Anchoress
Newly Registered User
 
Join Date: May 2007
Location: Vancouver, BC, Canada
Posts: 71
Thanks: 1
Thanked 4 Times in 3 Posts
Anchoress is on a distinguished road
Send a message via Yahoo to Anchoress
Question Parameter + Update question

Hi all:

I am trying to figure out how (if it's even possible) to update a field with the string of a parameter query search result from a different field? It doesn't have to be all in the same query.

I have a memo field that I want to search on with a parameter query, and then plug the text from the search into a different field.

So, source field called MEMO, destination field called FURNITURE.

Search for 'chesterfield' in MEMO, plug 'chesterfield' into FURNITURE field for returned records.

I'm going to be doing this hundreds of times with different strings, so I think it has to be a parameter query (unless there's a better option that's equally dynamic). Or, is there another way to bulk-update?

Oh, and I'm running Access2000 on NT4.0.
Any help is greatly appreciated. And Hello from Vancouver, Canada.


Last edited by Anchoress; 05-29-2007 at 04:13 AM. Reason: Info on system and software version.
Anchoress is offline   Reply With Quote
Old 05-29-2007, 04:34 AM   #2
Michael J Ross
Newly Registered User
 
Join Date: Mar 2006
Location: Durham,UK
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Michael J Ross is on a distinguished road
Will your memo field in your eg only include Chersterfield or will there be other text held also?
Michael J Ross is offline   Reply With Quote
Old 05-29-2007, 04:40 AM   #3
Anchoress
Newly Registered User
 
Join Date: May 2007
Location: Vancouver, BC, Canada
Posts: 71
Thanks: 1
Thanked 4 Times in 3 Posts
Anchoress is on a distinguished road
Send a message via Yahoo to Anchoress
Hi, Michael:

The MEMO field contains a quantity of other text, different for each record.

Anchoress is offline   Reply With Quote
Old 05-29-2007, 04:48 AM   #4
Michael J Ross
Newly Registered User
 
Join Date: Mar 2006
Location: Durham,UK
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Michael J Ross is on a distinguished road
Hi,

I think you need a update query and a form to enter your word, so that you enter e.g. Chesterfield only once.

In the query using the criteria under your memo field of Like "*" &[Forms]![NameofForm]![nameof textbox] & "*" and then in theUpdate To of your furniture column put [Forms]![NameofForm]![nameof textbox].

Add a button to your form which runs the query
Hope this helps.

Last edited by Michael J Ross; 05-29-2007 at 05:02 AM. Reason: Correcting solution
Michael J Ross is offline   Reply With Quote
Old 05-29-2007, 05:11 AM   #5
Anchoress
Newly Registered User
 
Join Date: May 2007
Location: Vancouver, BC, Canada
Posts: 71
Thanks: 1
Thanked 4 Times in 3 Posts
Anchoress is on a distinguished road
Send a message via Yahoo to Anchoress
Michael:

Thank you!!!! It worked like a charm! Now I'm getting greedy, though. Would it be easy to add a command to delete the string from the memo field after it's been added to the furniture field?
Anchoress is offline   Reply With Quote
Old 05-29-2007, 05:30 AM   #6
Michael J Ross
Newly Registered User
 
Join Date: Mar 2006
Location: Durham,UK
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Michael J Ross is on a distinguished road
Great glad it worked

I think you would need to use VBA to strip the string from the memo field, and I'm not sure about how to do that, sorry.

Michael J Ross is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parameter Query question JeffreyDavid Forms 7 11-19-2008 06:29 PM
Update query question Shep Queries 1 01-31-2006 11:38 AM
Question on parameter query? L'apprentis Queries 5 08-22-2005 03:03 PM
Macro autofill parameter query Question ccflyer Macros 5 08-19-2005 12:54 PM
update query question mohammadagul Queries 8 04-02-2004 06:54 AM




All times are GMT -8. The time now is 07:48 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World