Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...The enviroment is simple, natural and efficient. The members are competent, educated and professionals..."

Geography

Where in the world do Tek-Tips members come from?

Access 2007 - passing function variable to query wihtout using VBA

UnsolvedCoding (TechnicalUser)
15 Jun 12 16:51
I have a problem (again).

A table was made for a time sheet that houses employees last and first names with an employee number. Because those three fields need to be combined a select query was made which correctly populates the information - the field is called Emp_ID.

When the form that uses Emp_ID populates the combobox everything is correctly.

So far so good.

The queries that need to run follow the do.cmd statment in VBA but as soon as the VBA starts to use the SQL update statment the variables given in functions do not pass back to the table in Access and Access asks for the value of the Emp_ID field.

I need to fix this and the expression builder has a way to get into functions but nothing I have found for code samples or articles has fixed the problem of why the fields work and then go blank and why the table won't populate like it did a few hours ago.

This is driving me in circles.
Lilliabeth (TechnicalUser)
15 Jun 12 17:11
I'm not sure I understand... do you have a field in a table that should be populated with the concatenation of LastName, FirstName, and EmpNumber?
Is this what you are trying to do?

--Lilliabeth

UnsolvedCoding (TechnicalUser)
15 Jun 12 17:18
I have a query that contactenates the last name, first name and employee number into a string for a combobox in a form. However, the query is not retaining that information if I try to use it in SQL that is written in a VBA sub. It will run in the previous two do.cmds but not in the update statment in the same sub.

I checked the text and it matches between the queries and the SQL text.
dhookom (Programmer)
15 Jun 12 17:54
Unsolved,
This question may remain unsolved if you don't provide your code and/or SQL statements etc.

Duane
Hook'D on Access
MS Access MVP

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close