G
gurumum
Hi ,
My need in the form I'm talking about is very simple. I say this
because I've seen posts that say recordset clone can be used in a snap
to find a record.
I have not used access before. The little db work I did used oracle 8i
or sql server. So the "user friendliness" of Access just doesnt work
for me.
Scenario:
I have a form with 6 fields. These are 6 fields that are bound to each
of the 6 fields in a database. In order for the user to find a
particular record, I use a combobox (called combo_Find_Conf) that lists
the primary key field - conf_id of all the records.
When the user chooses one of the conf_id from the dropdown, the 6
fields in the form need to be populated with the corresponding data.
This is the code I used:
Private Sub combo_Find_Conf_AfterUpdate()
Dim rsConf As Recordset
If Not IsNull(Me.combo_Find_Conf) Then
'Save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rsConf = Me.RecordsetClone
rsConf.FindFirst "[conf_id] = " & Me.combo_Find_Conf.Value
If rsConf.NoMatch Then
MsgBox "Not found: filtered?"
Else
'Display the found record in the form.
Me.Bookmark = rsConf.Bookmark
End If
Set rsConf = Nothing
Next
End If
End Sub
I get the following error message:
"Compile error:
method or data member not found"
and the function "FindFirst" is where the cursor goes to after "OK"ing
the error.
Why does it say FindFirst is not found?
And if someone has a little extra time, I'd really appreciate how this
cloning happens in the background.
Subsequently, I tried using Find instead of FindFirst- didnt work.
It errored out at Set rsConf = Me.RecordsetClone
with the error "Type Mismatch"
This happened (i think) because Recordsetclone returns DAO's by
default.
so i tried using DAO.
I'm working on Access 2003. I was of the assumption that DAO would work
in this as well.
"Compiler error : user defined type not defined"
Its a simple "find a record" operation and man! its such a struggle.
any suggestions?
Thanks
Madhu
Looking to hear from you.
Madhu
My need in the form I'm talking about is very simple. I say this
because I've seen posts that say recordset clone can be used in a snap
to find a record.
I have not used access before. The little db work I did used oracle 8i
or sql server. So the "user friendliness" of Access just doesnt work
for me.
Scenario:
I have a form with 6 fields. These are 6 fields that are bound to each
of the 6 fields in a database. In order for the user to find a
particular record, I use a combobox (called combo_Find_Conf) that lists
the primary key field - conf_id of all the records.
When the user chooses one of the conf_id from the dropdown, the 6
fields in the form need to be populated with the corresponding data.
This is the code I used:
Private Sub combo_Find_Conf_AfterUpdate()
Dim rsConf As Recordset
If Not IsNull(Me.combo_Find_Conf) Then
'Save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rsConf = Me.RecordsetClone
rsConf.FindFirst "[conf_id] = " & Me.combo_Find_Conf.Value
If rsConf.NoMatch Then
MsgBox "Not found: filtered?"
Else
'Display the found record in the form.
Me.Bookmark = rsConf.Bookmark
End If
Set rsConf = Nothing
Next
End If
End Sub
I get the following error message:
"Compile error:
method or data member not found"
and the function "FindFirst" is where the cursor goes to after "OK"ing
the error.
Why does it say FindFirst is not found?
And if someone has a little extra time, I'd really appreciate how this
cloning happens in the background.
Subsequently, I tried using Find instead of FindFirst- didnt work.
It errored out at Set rsConf = Me.RecordsetClone
with the error "Type Mismatch"
This happened (i think) because Recordsetclone returns DAO's by
default.
so i tried using DAO.
I'm working on Access 2003. I was of the assumption that DAO would work
in this as well.
"Compiler error : user defined type not defined"
Its a simple "find a record" operation and man! its such a struggle.
any suggestions?
Thanks
Madhu
Looking to hear from you.
Madhu