Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL as Control Source for Access Form field

Tags:

sql

vba

ms-access

Is there any way populate an Access Form's text feild's value using SQL?

I have read that it is not possible to simply enter SQL as the Control Source. Is this true?

thanks for any halp :)

--edit--

I need to perform this query;

SELECT tblCaseIssues.IssueDesc FROM tblCaseIssues INNER JOIN tblCaseNewHS_Issues ON tblCaseIssues.ID = tblCaseNewHS_Issues.IssueID WHERE(tblCaseNewHS_Issues.HS_ID = 81))
like image 334
Jambobond Avatar asked Aug 21 '09 13:08

Jambobond


People also ask

What is control source in Access form?

You can use the ControlSource property to specify what data appears in a control. You can display and edit data bound to a field in a table, query, or SQL statement. You can also display the result of an expression. Read/write String.

Can you write SQL in Access?

In MS Access, you can create a SQL query by either writing the code directly (SELECT field FROM table) or you can use a special interface to help construct the code for you.


1 Answers

Pretty sure that is true SQL, but you could use the function:
=DLookUp("field_name","table_name","any_fieldname = 'value'")

like image 115
JeffO Avatar answered Sep 30 '22 00:09

JeffO