var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Help with dlookup function
I wat to use the dlookup function to get the first (and only) record in a table.
I have the following code in an onclick event of a command button:
Dim Stfrmt as String
stFrmt = DLookup("field name", "table name")
I get an error saying there is no current record.
When this code runs a query is open based on different tables. I'm thinking I have to set the recordset to this table but don't know the syntax.
THanks in advance
With the exception of the field and table names this is the exact code that I tested in a button. It worked properly so the problem isn't in the code you provided.
Dim Stfrmt As String
Stfrmt = DLookup("[field name]", "table name")
only thing he was missing were the brackets around the field name