Did you ever get help with this?? I have been working on kind of the same thing and MAY be able to help...I emphasize may because I am really new to VBA....
I got the code below to work (resides in Excel 2007)...what it does is when I open my workbook, it asks me if I'm ready and then automatically opens the connection to my Access Database, runs an Access query, pulls that information into Sheet 2 of my workbook, and then queries the data (within...
Thanks SkipVought...its not that big of a table...I'll probably just try a lookup like you suggested :) thanks for the reply!! don't know why I thought it would be a good idea to start this thread on a Friday [ponder] but I will definitely post the solution (if I can figure it out) when I get...
Thanks FractalWalk!!...I'll try both methods and let you know how it goes...honestly I don't care if I get 50 and then query that 50 in Excel or if I query Access and only get one in Excel as long as I can eventually get it down to one record based on a number entered and then hitting "Enter"...
Working in Access 2007 and Excel 2007....
I have an .accdb (WellCardPilot.accdb) that pulls information from multiple tables (some linked, some built into the DB). The following code works fine to return all records from a query called BridgeportWellCard to a specific worksheet in Excel (Sheet...
Thanks!...I got it but I changed the code a little to this:
Private Sub Text20_LostFocus()
Dim cnt As Integer
cnt = Me.RecordsetClone.RecordCount
MsgBox "Cnt " & cnt & " Ab Pos " & Me.Recordset.AbsolutePosition
If cnt = Me.Recordset.AbsolutePosition + 1 Then...
Thanks MajP but that didn't work...Here is a URL to a screen-shot of my form and subform (.pdf) to hopefully illustrate what I am trying to accomplish.
http://www.mediafire.com/?si5az9bds6zi2y9
-T
I need to be able to Tab from the Last Record on a subform back to the Header on my main form...I tried using SetFocus OnExit but then I can't scroll through every Record on the subform, only the first one. I also tried using an event procedure OnExit from the subform but the Tab just loops...
Thanks for the the help :)
ID is numeric, Well is not. Remou's code worked great:
a = DLookup("[FileLoc]", "WellLogDetails", "[Well]=Reports!Report2![Well] And [ID]=Reports!Report2![ID]")
Thanks!
Access 2000, Windows XP
I need to lookup an entry in WellLogDetails based on two criteria in Report2 and all three of the following codes return errors....any suggestions?
'a = DLookup("[FileLoc]", "WellLogDetails", "[Well]=Reports!Report2![Well]" And "[ID]=Reports!Report2![ID]")
'a =...
I need to lookup an entry in WellLogDetails based on two criteria in Report2 and all three of the following codes return errors....any suggestions?
'a = DLookup("[FileLoc]", "WellLogDetails", "[Well]=Reports!Report2![Well]" And "[ID]=Reports!Report2![ID]")
'a = DLookup("[FileLoc]"...
It worked using the following code (see below): I had to use DLookup to query the file path from my table. The only thing I can't figure out now is I want [Well].WellLogDetails to equal the entry I am viewing and the only way I could think to do that was to open a report and pull the...
I am trying to write a code and am failing miserably. I have a command button in a subform...I would like to click on that button and have a .pdf file (associated with the current entry) open in a program other than Adobe Acrobat. The file paths are entered as a field in a table called...
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.