Firstly I am not sure if this is the right forum, apologies if it is not.
From tSQL dataset we have a value which comes out as a total number of seconds.
We need to display this as HH:mm. we thought we had it cracked when we found:
=Format(Timeserial(0,0,Fields!TotalTime),"HH:mm")
However...
Good afternoon,
When running the following code i get a Compile Error "Loop without Do".
Have also tried it with a For - Next loop but similar results.
Any ideas?
there are no other do's or loop's within the module
y = 8
Do
y = y + 1
If dots >= 5 Then
dots = 0...
Ah thank you very much.
After that i need to select elements in the query like:
Form_frm_EditAgent.sfrm_AgentDetails.Field1 but when i type this in, nothing comes up on command menus like usual.
How can i access them?
Ah, i should mention is that when it sends the data to the form it works fine, but on the refresh code:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
it says "Refresh not available" in an error message.
If i wait for about 30 seconds the data updates on its own but i need it to...
Private Sub dd_Name_Change()
Dim strSQL As String
strSQL = "UPDATE tblVar SET [AgentID]=" & Form_frm_EditAgent.dd_Name.Value & ";"
DoCmd.RunSQL strSQL
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
End Sub
What the above should be doing is when the...
SELECT tbl_Agents.[AgentName], tbl_Agents.[Aspect_No] FROM tbl_Agents WHERE tbl_Agents.[TM_ID] = 2;
Sorry, that's how it appears in the immediate window
I run the following from a command button:
Dim strSQL As String
strSQL = "SELECT tbl_Agents.[AgentName], tbl_Agents.[Aspect_No] " & _
"FROM tbl_Agents " & _
"WHERE tbl_Agents.[TM_ID] = " & Form_frm_TMs.dd_TMID.Value & ";"
DoCmd.RunSQL (strSQL)
And get...
I have a query lets call him Bob_The_Query.
And i have a boolean who we will call Ted_The_Bool
I need VBA code which will return Ted_The_Bool as True if there are no records returned whan i run Bob_The_Query.
All help is muchly appreciated.
Thanks a lot once again Golom.
It was returning:
Dave
Dave
Ted
But adding "DISTINCT" after the SELECT worked just fine.
Also defining tables as easier to write letters "tblRecords As R" is a neat way of doing it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.