MS 2010 Forms - Creating Recordset
I am using the below code to read the table but it's not working. Can somone plz send me the code should I use in 2010?
Dim Dbs As Database
Dim rs As Recordset
Dim X As Double
Set Dbs = CurrentDb
Set rs = Dbs.OpenRecordset("[2b - 2010 Campaign Details]")
AA = "00100000002ta6TAAQ"
Do While Not rs.EOF
If AA = rs!AccountId Then
MsgBox ("Got it!")
Thank you for taking the time to report an issue.
What's wrong... Please write below.
The code uses ADO. My goal is to split this database to create a multi-user environment. The source table has a primary key and there are no calculated fields.
Can someone please explain how I can make this recordset updatable.
Default Form with combobox cb_default
Main Form with combobox cb_Main and a listbox lst_main
I have bound the Default form to a recordset and retrived a column of the table into cb_Default.I want to populate the cb_Main from the same recordset according to the value selected in cb_Default and populate lst_main from the same recordset accoording to value selected in cb_main.
Do I have to bind the recordset to each control because the query is not same for all
I am little confused
Is it not possible to open a recordset off the results of a prior opened recordset
In this lesson, you will learn how to add command buttons, modify form layouts, add logos and other images, in addition to changing form colors and fonts.
Private Sub Form_Current()
Forms!A.btnNext.Enabled = (Not Forms!A.Recordset.EOF) End Sub
There is a Form "A" and a button "btnNext" on it. onCurrent I'd like to gray or not to gray it out depending on whether the last record has been reached or not.
What is wrong about the code above? It doesn't work.
Forms!A.Recordset.EOF seems to return only FALSE (even at end of RecordSet
The forms recordset has 3 rows. One of the fields is a status flag. I want to only show the rows in my recordset where the StatusFlag is empty ("").
I use the filter but when I do a row count I still get 3 rows
Set rs = srcForm.Recordset
rs.Filter = "StatusFlag = """""
me.recordset.move x, 1
However, I keep getting a "not a valid bookmark" error.
What am I missing? Does the form's recordset object take different methods to an ADO recordset?
Of course, I can achieve the same effect using:
but that doesn't help me to understand why I can't get .move to work with two parameters