473,320 Members | 1,862 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,320 software developers and data experts.

using variables in query

I am trying to use a combo box to set a variable, and then refresh the form using that variable when the combo box is changed. I've used the following method before, but must be forgetting something else I need to do. What is it.
THe combo box has the following when it is changed

Private Sub Combo43_Change()
Userrname = Me.Combo43.Text
DoCmd.Close
DoCmd.OpenForm "Entry 2"

Exit_Combo43_Change:
Exit Sub

When i run it i get a message which says 'undefined function getuserrname in expression.
What do I need to do?

In the query, the column I want to use the value in is
getuserrname()
Jun 20 '06 #1
2 4632
PEB
1,418 Expert 1GB
Hi,

And the function getusername() where is it placed?

And other question is this function depends on the content on which record or no?
Sep 3 '06 #2
MMcCarthy
14,534 Expert Mod 8TB
If Username in your query gets its value from getusername() is it actually a field in a table. Have a look in your modules for this function. What is it doing?

I am trying to use a combo box to set a variable, and then refresh the form using that variable when the combo box is changed. I've used the following method before, but must be forgetting something else I need to do. What is it.
THe combo box has the following when it is changed

Private Sub Combo43_Change()
Userrname = Me.Combo43.Text
DoCmd.Close
DoCmd.OpenForm "Entry 2"

Exit_Combo43_Change:
Exit Sub

When i run it i get a message which says 'undefined function getuserrname in expression.
What do I need to do?

In the query, the column I want to use the value in is
getuserrname()
Sep 3 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: bofh | last post by:
I'm working on a project where I need to store a CGI query in a database field. The query contains variables which will be substitued at runtime (e.g., today's date, key to select upon, etc), and...
7
by: Gary | last post by:
I haver a table of students - Say 100 students that I need to be able to update/delete and amend. I know I can do this one student at a time which is simple but lets say I want to see all the...
9
by: shank | last post by:
Per a previous suggestion, I'm trying to use a parametized query in Access 2002. The query functions properly in Access. Now I'm trying to call it from ASP. I'm using code I found at...
175
by: Sai Hertz And Control Systems | last post by:
Dear all, Their was a huge rore about MySQL recently for something in java functions now theirs one more http://www.mysql.com/doc/en/News-5.0.x.html Does this concern anyone. What I...
1
by: stephane | last post by:
I have a problem which must be in this : print" <script type='text/javascript'> document.location.replace('http://127.0.0.1/add_task.php?req_id={$maxValue}&tk_request_name={$req_name}');...
19
by: Mitesh | last post by:
Hi all, I have the following code: $req = "SELECT * FROM table1"; $res = mysql_query($req); if(!$res) return;
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
3
accessbunnie
by: accessbunnie | last post by:
Hello Access Users! I am a bit of an Access novice and am currently creating a database and have come up against a huge (for me!) road block. I do not write in Access code and instead, tend to...
3
by: skaushik | last post by:
Hi all, I ran an explain plan for a sql query which has some bind variables used in it. The plan shows that index is being used but the execution takes a very long time. Also, in another query the...
2
by: franc sutherland | last post by:
Hello, I am using Access 2003. Is it possible to use string variables in the INSERT INTO statement? I am using the INSERT INTO statement to add a long list of contacts to a group by looping...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.