Well since your variable sUserID is defined as String you must enclose it in quotes.
sGroupID= Dlookup("DepGroupID", "UserNames_tbl", "[sUser]= '" & sUserID & "'")
JR
Since you do a boolean comparison you can do it in one line
ex:
Me.Text360.Locked = Not Isnull(Me.Text360)
You use the Not operator to reverse IsNull() test from True to False and False to True
JR
To open a recordset on your Data table:
Set rs = db.OpenRecordset("Select DAX, DAXav From Data Order By [Date]", dbOpenDynaset)
Note that the DATE field is enclosed in square brackets because "Date" is a SQL reserved word
as a sidenote what you are attempting is storing a calculated value...
You could use the QueryDef object to list alle queries, combo/listboxes, forms/reports that use a SQL-sting in its recordsource.
Function AllQueries()
Dim qdf As DAO.QueryDef
For Each qdf In CurrentDb.QueryDefs
With qdf
Debug.Print .Name
'Debug.Print .SQL
End With
Next...
If the field ListPr in the table InvestorClient is the "textNumber" then I would think that this should work:
((A5.LP)> CCur([InvestorClient]![ListPr])));
JR
Put the expression in the Controlsource of the control and make it a calculated control.
=Dateserial(left([Field],4),mid([Field],6,2),mid([Field],9,2))
where [Field] is the name of your tablefield in the forms recordsource.
JR
I think you have a structural problem with the table that your subform is based on, does the table look something like this:
ItemID
StockIn
StockOut
..other fields
If so then thats not how it suppose be, any transaction table should have In/Out in one filed with StockOut be a negative number...
If you struggle with delimiters or data containg quotes then you can a create on-the-fly parameter query:
Dim qdf As DAO.QueryDef
Set qdf = CurrentDb.CreateQueryDef("", "Insert Into History([Item #],[Part #],[Item Description],Stock) " & _
"Values...
I think one problem here is that the subform opens BEFORE the main form so your refrence to the main form would be invalid.
You don't need the .Form part when refrencing your main form
Perhaps moving the code to your mainform's Current-event might get you there.
JR