I'm sure this is easy, I'm just not getting it though.
All i want to do is use an ado connection in vba to create a record set based on my sql statement and then populate my variables with the data from the record set.
But I don't know if this should be in a sub, or it's own function, and I...
How can I number rows/records in a record set?
Meaning, I have :
select id,name,address,phone#
from blah,blah,blah
where blah,blah,blah
My results could look like this:
ID Name Address Phone#
1 Ted 123anytown 1231231234
1 Ted 123anytown 1231231245
2 ED 789mystreet 5675675678...
Never Mind, I figured it out.
Basically I'm not only new to coding, I'm new to typing as well. Plain & simple, typo on my part......Thanks for the help and putting up with my questions.
Based on what vbajock started this is what I have:
Function1DB1()
Dim ReturnValue As Boolean
Set db2= New Access.Application
db2.OpenCurrentDatabase (strDBName)
on error goto err_h
ReturnValue = db2.Run("function2DB2",parameters1&2)
(I never get here) Just goes to the error
If ReturnValue=...
Ok, I was incorrect in saying that. I'm not having errors, just not able to tell function 1 in db1 that function 2 in db2 has completed successfully or failed.
How would I send some type of return result back to function1 in db1?
Thanks
Ok, That's not how I was doing it, but that works just as nicely, however Now I'm back to the original issue of being able to produce a result back in function 1 of database 1?
Thanks , this is getting pretty good!!
Hey Jamie, yes, I think I'm already doing that , this is my call:
function2.Run("functionname", parameter, parameter).
function2 <-->here represents my new access application with path.
So is it correct to use the Run command, or should I be using something else?
Thanks for all the comments.
Would it still work if I'm calling from one database to another?
Also you don't think it has anything to do with the automation call?
Thanks, this is very helpful.
Hey everyone, I know I should know this, but I'me either having a brain cramp or I've missed something. So..... I have a first function that calls a second function and in the second function I set a return value and send it back to the first function. <whew>.... So I know if the second function...
is there a way to have my case Case "fname", "First_Name", "FirstN"
set up in an external file, and use a variable there?
Case strWhatever
then in an external file
Firstname = "fname", "First_Name", "FirstN"
in the assumption that there will need to be another version of first name added to...
I'd like to know if it's possible to ave a query that looks for columns befor it actually selects? I might not be asking this correctly, so let me give an example.
Select (fname or first_name) as FirstN
Basically scan the dataset to see what the available columns are and then when I find a...
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.