Create a report based on your query. No Report header or footer. Put a page break at the bottom of your detail section and you will get a one page report for each record in your query.
try putting:
txtInstallDate_AfterUpdate
in the form's current event. You can change the value in an existing record or see the calculation when you move to a new record.
You may want to start with reading Microsoft Knowledge base article Q190194
http://support.microsoft.com/support/kb/articles/Q190/1/94.ASP?LN=EN-US&SD=gn&FR=0&qry=q190194&rnk=1&src=DHCS_MSPSS_gn_SRCH&SPR=ACC2000
To make your picklist change records you can do something like this. Just change the names of the controls and fields to what is used on your form:
Sub combo1_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[ID] = " & Me![combo1]...
to run the statement as it is I believe you paste it into a new query's sql window then run it.
to run it as code you could put the following in a new module:
dim strSql as string
'next is all on one line
strSql = "INSERT INTO Employees (FirstName, LastName, Title) VALUES ('Harry'...
from access help:"The Execute method is valid only for action queries. If you use Execute with another type of query, an error occurs. Because an action query doesn't return any records, Execute doesn't return a Recordset. "
maybe you want to open the recordset and work with the...
try if this alteration will work:
sqlstring = "SELECT Bondclass.bondamount AS [ls_holdamt] FROM Bondclass WHERE Bondclass.class = " & Me!Combo83.Value
Your combo83 value has to be added to the string by concatenation otherwise it won't find anything in the class field whose contents...
the following:
"SELECT * FROM DETAILS WHERE FIRST LIKE " & chr(39) & "A*" & chr(39)
will get the string constructed as VBA needs it
in the afterupdate event of the combobox type:
me![tara]=me![licensenumber].column(1)
columns in comboboxes are numbered from 0 so your weight is in column 1 (the second column)
HTH
I'm not sure of the purpose of the two count columns, field1count and field2count. Do they represent the number of times a person has answered a particular type on different occasions? Can these two fields be added? It would make a crosstab query easier to produce.
If I understand correctly, if you group by one field and count by another field then the counted field counts only the non-null entries? If that is the case, can you use a field that always has data to count by such as an ID field or a "required" field?
it should look like this:
Private Sub Form_Current()
Dim recClone As Recordset
Set recClone = Me.RecordsetClone()
recClone.Bookmark = Me.Bookmark
recClone.MoveNext
cmdNext.Enabled = Not (recClone.EOF)
recClone.MovePrevious
End Sub
I tried it with your second approach for the button.
The clone recordset is not in sync with the form. Use the bookmark of the form's recordset to set the bookmark on the clone rset then use the move method which should get your clone to EOF and then it should disable the button.
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.