Thanx Roy, very valuable words of wisdom.
The answer to my quandary turned out to be relatively simple, i was declaring in non-standard access form.
I had been used to declaring varibales like this...
Dim rs, r1, rs2 As dao.recordset
but now I realise Access doesn't like it so I will now...
Ok, to answer a few questions.
The code has not been written with any reference to ADO objects. Both recordsets in question are DAO recordsets from a DAO Database reference.
The code is written in a form module, which i am assuming is the code generated with relation to a particular form. As...
i put "call" in front of the statement and initially it is fine but when it runs, error occurs...
" Compile error, ByRef argument type mismatch "
Additionally, I didn't understand your last statement about the modules, could you rephrase or clarify if possible.
Thanx for the help,
Shaun.
Is this possible to pass two recordsets to another sub??? I assumed using the code ...
-------------------------------------
dim rs1 as dao.recordset
dim rs2 as dao.recordset
code...
code...
bulkSelect (rs1, rs2)
Pass to another sub
Public Sub bulkSelect(rs1 As dao.recordset, rs2 As...
Finally got it out. Now all navigation works. Lucky I'm not a charity or no-one would donate to this cause....
----------------------------
Dim intEmp As Integer
Dim strName_last As String
Dim DB As DAO.Database
Dim rst As DAO.Recordset
aSql = "SELECT tblEmployee.chrName_last...
Yeh, the findFirst and findLast is fine, the code in my last post works fine. Even if that wasn't what was instructed, it still works.
It is the move previous and move next commands that I cant get to work as I wrote last time. As the .move method doesnt take parameters, i cant tell it what...
The moveLast and moveFirst are working fine as I am using the complete table as a recordset. It just runs an SQL procedure and goes to the first record or last record in the set, (first record or last record in the table). I am just struggling to work out how to pass the current name_last and...
All, this is the code I get to:
Dim DB As DAO.Database
Dim rs As DAO.Recordset
sSql = "SELECT tblEmployee.intEmployee_id, " & _
"tblEmployee.chrName_last " & _
"FROM tblEmployee;"
Set DB = CurrentDb
Set rs = DB.OpenRecordset(sSql...
I assume that is the statement to return the attributes from that current last_name but what I actually want to do is find the first, next, previous and last "name" when each button is pressed. Once the name is found, I run another query to populate the fields on the form so that this...
I am aiming to use last names of employees to navigate through each employee, i.e. forward, back, first and last. However my form is set up with unbound controls so I can not use the normal navigation buttons.
I was just wondering how I can take the value from my combo box of lastnames, loop...
Hey all,
I am looking to write an insert statement that writes one tuple for each product in the parent table and multiple tuples in the child table for each specific product.
For instance,
Parent Table: Product
Columns: prod_id, prod_desc, prod_origin
Child Table: Product Prices
Columns...
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.