[AccessD] Recordset references

Stuart McLachlan stuart at lexacorp.com.pg
Mon Sep 6 16:37:01 CDT 2021


Use square brackets.

Function TestName()
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("Table1")
Debug.Print rs![Field one]
rs.Close
Set rs = Noth

On 6 Sep 2021 at 17:28, Arthur Fuller wrote:

> Given a DAO recordset based on a table, some of whose fieldnames
> contain spaces, how does on refer to them? For example:
> stEmployees!FirstName
> 
> Down't work because the actual fieldname is "First Name" not FirstName
> 
> Do I wrap the actual first name fieldname in quotes after the bang? Or
> what?
> 
> Thanks.
> 
> -- 
> Arthur
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list