473,396 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

saving [enter a value] in update query

Hello.

No one in the queries newgroup answered this question. I hope someone here
can. Thank you. Stuart

The following Update Query allows my users to substitute a numerical value
for the phrase "Allele 2" in the field Taqcall. This is run from a command
button on a form for the table:

UPDATE tblSEQTAQ AS A SET A.taqcall = [Enter a Value for Allele 2:]
WHERE (((A.taqcall)="Allele 2"));

I would like to display the value entered to replace "Allele 2" in the
table. That is if the user changes all of the "Allele 2" values to the
number "1," then I want to have the number 1 displayed on the form next to
a caption that reads "Allele 2."

TIA for your help.

Sincerely,

Stuart E. Wugalter
Statistician II
Building: PMB B100
Mail Code: 9011
Department: Zilkha Neurogenetic Institute
Division: Keck School of Medicine
Telephone: (323) 442-1080
FAX: (323) 442-3054
E-Mail: wu******@usc.edu

Nov 12 '05 #1
1 1921
dp
I get around this problem of asking for values twice for parameters in
queries with global variables. Here is what I do: I have module with
public code in it.

global savedVar as string
-----------------------------------------------------------------
public function savedVarReturn() as string
savedVarReturn = savedVar
end sub
-----------------------------------------------------------------

BEFORE you start to run the query, do an

savedVar = inputbox("What is the value of the parameter?")

Now you have the value in "savedVar" which is global, you can reference it
straight from code, or, if you want to retrieve the value for a query
parameter, as the criteria of that field, put the return function in the
criteria... Since it doesn't change, you can use it for a second, and third
query as well.

savedVarReturn()

Remember, you must have filled in savedVar before you call the function from
within the query.

-Brian
"Stuart E. Wugalter" <wu******@usc.edu> wrote in message
news:c1**********@gist.usc.edu...
Hello.

No one in the queries newgroup answered this question. I hope someone here
can. Thank you. Stuart

The following Update Query allows my users to substitute a numerical value
for the phrase "Allele 2" in the field Taqcall. This is run from a command
button on a form for the table:

UPDATE tblSEQTAQ AS A SET A.taqcall = [Enter a Value for Allele 2:]
WHERE (((A.taqcall)="Allele 2"));

I would like to display the value entered to replace "Allele 2" in the
table. That is if the user changes all of the "Allele 2" values to the
number "1," then I want to have the number 1 displayed on the form next to a caption that reads "Allele 2."

TIA for your help.

Sincerely,

Stuart E. Wugalter
Statistician II
Building: PMB B100
Mail Code: 9011
Department: Zilkha Neurogenetic Institute
Division: Keck School of Medicine
Telephone: (323) 442-1080
FAX: (323) 442-3054
E-Mail: wu******@usc.edu

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jacob H | last post by:
Hello list... I'm developing an adventure game in Python (which of course is lots of fun). One of the features is the ability to save games and restore the saves later. I'm using the pickle...
3
by: Stuart E. Wugalter | last post by:
Hello All! I have a button on a form that is tied to the following query: UPDATE tblSEQTAQ AS A SET A.taqcall = WHERE (((A.taqcall)="Allele 1")); The user looks at the form and decides to...
9
by: Megan | last post by:
Hi- I'm creating a database of music bands with their cds and songs. I'm trying to program an SQL statement so that I can enter a string of text in a textbox, press the 'Enter' key, and have...
2
by: lgo | last post by:
I have read several variations of this topic posted on this news group. However I was not able to find the answer for my problem. I am trying to build code (see below) to update a large single...
13
by: Stuart McGraw | last post by:
I haven't been able to figure this out and would appreciate some help... I have two tables, both with autonumber primary keys, and linked in a conventional master-child relationship. I've...
2
by: NCrum | last post by:
I have a DataGrid bound to an Access 2K database entering a time in the grid either via a DatetimePicker or directly into the field the time displays Ok on the grid but will not update the...
5
by: mimo | last post by:
Hello, I have seen samples on how to pull data from one table and save back to it using the Form View control. How do I pull from multiple tables and save back to multiple tables on one...
6
by: Paul Furman | last post by:
I'm getting incorrect response when hitting the enter key instead of actually clicking the button on a form. It activates but the post data isn't being sent I think. The php generated page...
0
by: Magnus Bergh | last post by:
I am developing an application for pocketpc and this involvs a but of juggling with different forms. I have an "order entry" type of application. On the main form I have a grid which displays...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.