Yes SWi, I agree with LameID, i'm amazed the recordset & count property EVER worked. All the same. excuse the obvious but "Job File" & "JOB ITEMS Query" forms, must be open. (assuming parent & child form) Is the control holding this expression, located on either form/subform?
All the same, i...
Or,
depending on what dictates the value of MyVar,
you could use the source as an argument, to your function.
On Click Event of each cmdButton..
If TextBox on current form
"= ReturnWard([txtMyVar])"
If "random value"
"= ReturnWard(6)"
etc...
As Remou said, otherwise, convert the "short time" variable,
to a string...
Dim varStartTime As Date, varEndTime As Date
Dim strStartTime as string, strEndTime as string
varStartTime = "10:00"
varEndTime = "14:00"
strStartTime = Format(varStartTime, "short time")
strEndTime =...
Actually, small oversight (in case you decide to use this)...
Do Until rec.EOF
For x = 1 To 2
SQL = "INSERT INTO NewTAble(SupplierID, PackagingType, Value)" & _
"VALUES(" & rec(0) & ",'" & rec(x).Name & _
"','" & rec(x) & "')"
conn.Execute SQL,,adExecuteNoRecords...
Very quickly, of the top of my head...
Rec As New ADODB.Recordset, SQL AS String, x as integer
conn as New ADODB.Connection
Set Conn = CurrentProject.Connection
rec.open "tblPackage", conn, adOpenForwardOnly, adReadOnly
Do Until rec.EOF
For x = 1 To 2
SQL = "INSERT INTO...
As PHV said, that would be the easiest but, just for the record,
you could create a form from scratch, change the
"recordsource" property to any table or query you like,
from there, the "Fields" icon from your menu bar,
will offer all the available fields (dictated by your recordsource)...
kopy, try to speak in more general terms.
What's a "drawing" file?
...a file in same/another directory?
What, where & how, do we find the "Current part Number"?
..from a main/sub form, with the focus?
VBA has many file search and manipulation functions.
And print methods & actions.
Type...
You can't enter Numeric values? ...can you enter text values?
Check all properties...,
Subform, enabled/locked.
Check the recordsource, any calculated fields.
Any of the controls, enabled/locked?
Ragah, Ace & I are probably unsure where & what recordsource
you're updating (parent, child, control?).
So, if main form, Me.recordsource.Requery
or Me.refresh or Me.Recalc maybe Me.Repaint
If subform Me.sfrmName.Form.Requery
it appears you tried to requery a control.
I think only listboxes...
Sellert, otside of Ace's code, you consider either
using "Totals/Grouping" query(toggling the Sum icon
on the menu bar, in the query pane), or just downright
use the grouping properties on the report,
from design view (preferred!).
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.