Setup the recordsource of form using the open event
ie
Dim strSQL as string
strSQL = "Select * from YourTable where USERFIELD = '" & current_user & "'"
Me.recordsource = strSQL
Hope this helps
John
You can manipulate the sub-from dataset directly
ie
dim frm as form, rst as recordset
set frm = me!SubControl.form
with rst
if .recordcount > 0 then
.movelast
frm.bookmark = rst.bookmark
end if
end with
just another way of doing things
John
Is there a way to manipulate a sub-forms record source whilst in the parent form. I can't see any sub-form properties that return a record source.
I want to allow the user to dynamically change some of the selection criteria applied to the sub-form
Thanks in advance for any help
John
I would use the on current event to see if it was a new record and if so, set focus on the first tab and disable the second and third tabs.
You can then use the update event on wc_name to enable them
Hope this helps
John
Is there a way to disable a list box entry so that a user cannot re-select that entry, but still have it displayed in the list box
Thanks in advance for any help
Is it possible in VBA to store the name of a variable in another variable and then access
the value of the first variable through the second (just like macro substitution in Xbase)
ie VarA = 10
VarB = "VarA"
Value is &VarB
You will receive this error message if you do not explicitly set the value of the parameter query when using VBA
an example would be
dim db as database
dim qryDef as querydef
dim rst as recordset
set db = currentdb
set qrydef = db.querydefs.("MyQry")
' sets parameter to current value on...
The mosy common reason for this is that you have based your query on one or more tables that do not have primary keys. Access will not update the tables if it cannot uniquely
identify the appropiate record
I have a form with various records on a datasheet subform ie JobHeader and then various job details.
Is it possible to change the colour of a row on a datasheet dependent upon the value of a cell within that row
I wish to do this to highlight jobs that have been computer generated as opposed to...