Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert querie in a textbox

Status
Not open for further replies.

JoanaSantos

Programmer
Feb 24, 2015
33
EU
how can i run a querie and insert the result in my textbox?
the result only have one field:

fec_data
21/04/2015


the query is a union between two tables(select)
INSERT INTO Balancetes_data ( fec_data )
SELECT DISTINCT T_MES.fec_data
FROM T_MES INNER JOIN BALANCETES ON T_MES.Fec_Data = BALANCETES.Fec_Data;


with vba code please
 
You query is an action query that doesn't return a value. You can use domain aggregate functions like DLookup() or DMax() to query a single value from a table or query.

You can also use the Concatenate() function faq701-4233 to return a single value from an SQL statement.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top