Search results

  1. D

    Problem with recordset EOF

    I have a recordset that says Recordcount is 7, but when I tell it to MoveLast, it goes to 6. If it's on 6 and I tell it to MoveNext, it goes into EOF and gives errors. The code is too long to post here, but I did a search and saw some comments about problems with nested loops. This makes...
  2. D

    Problem with recordset EOF

    I have a recordset that says Recordcount is 7, but when I tell it to MoveLast, it goes to 6. If it's on 6 and I tell it to MoveNext, it goes into EOF and gives errors. The code is too long to post here, but I did a search and saw some comments about problems with nested loops. This makes...
  3. D

    Do I need a temporary recordset?

    I imagine there are a few ways to do this, but hopefully someone can help me with a simple one. Background: I need the code to go through a recordset and make a note of all the corresponding records in another table that need to be acted on; however, they can only be acted on once. For...
  4. D

    Simple question: Requery form

    I can't seem to get my form to requery, and honestly am surprised I am hung up on this. I have a continuous form that has fields that need to be hidden and unhidden depending on data in that record. So after they update a record, a field may be hidden or unhidden (technically, just a lookup...
  5. D

    Requery Dlookup field on subform

    I have a subform (continuous form) with a Dlookup field that looks up information based on another field in the record. The problem I have is that when a person inputs the information, code looks up the other information (which is part of the underlying query: and I can't put this field in the...
  6. D

    Can DLookup refer to the previous record?

    Hi, I have a repeating form, and I wondered if there was a way to put in a field that would look up something based on info in the previous record. Basically, I want to display info for the user's reference saying that this record refers to where the last record ended +1. I know it's a long...
  7. D

    Can DLookup refer to the previous record?

    Hi, I have a repeating form, and I wondered if there was a way to put in a field that would look up something based on info in the previous record. Basically, I want to display info for the user's reference saying that this record refers to where the last record ended +1. I know it's a long...
  8. D

    Read forward in recordset without moving current record?

    Hey all, I could swear I've seen a way to read the contents of the next record without actually telling the recordset to movenext. Like a +1, +2 type of thing. But I can't find it now. Can this be done and what is the language? Thanks, Doc
  9. D

    Form saves and moves to next record when sub ends

    I have an Access interface to a network SQL database. The form is set to "Dynaset (Inconsistent Updates)" to allow for a complex underlying SQL query. After someone enters data in a field, it is supposed to open another form to allow them to choose additional info to insert into the record...
  10. D

    Can't open a recordset of a subform

    Hey all, I'm trying to open a recordset of a subform. I've tried: Set rst = Forms![frmQuickEnter].Recordset Set rst = Forms![frmMain].Form![frmQuickEnter].Recordset Set rst = Forms![frmMain].Form![frmQuickEnter].RecordsetClone All throw errors. Can I open a recordset of a subform, or do I...
  11. D

    Primary Key Violation in Update Query

    Hey, I am getting a primary key violation when I try to run an update query. My primary key is a combination of two fields, ScheduleID and SchedulePage. That way for each schedule I can only have one Page 1, one Page 2, etc. When I want to insert a page (say a new Page 2), I need to update...
  12. D

    Dynamic Object Frame

    I would like to open a form that shows a word document (or preferably a thumbnail of a word document) in an object frame. The document(s) displayed would need to change based on information on the form, or sent to the form when opened. I would strongly prefer this to be an unbound frame since...
  13. D

    Min/max from secondary table without returning extra rows from primary

    Hi all, don't know if this is possible, but right now I'm running a query and then performing Dmin/Dmax on each record in the recordset and it's running SLOOOOW. Perhaps if I can get it from a query it would be faster. I have Table-A and Table-B with a one to many relationship. In the Table-A...
  14. D

    Connect to network folder as different user/logon?

    I need to know how to connect (via vba) to a networked folder on a server using a different logon (which will need to send a username and password). Background: I have scripted the Access db to move files on a network server. The security folks don't want to give full write access to each user...
  15. D

    Should I use Select First?

    I'm having trouble with a select first query. I'm getting an error saying whichever item follows my select first statement (in this example TariffID) "is not included in the aggregate function." See example. Background is below. SELECT First (SchedulePage) as FirstPage, TariffID...
  16. D

    Complex query sort

    I need to sort my query in a rather complicated way, and haven't been able to get the examples I've found on here to work. I have the following fields [Category] [Name] [Page] Here is what I need. Where [Category] = "Table of Contents" Sort by [Name], Then by [Page] Descending Else Sort by...
  17. D

    SQL Query syntax giving Access problems

    Can someone tell me where I might be going wrong here. The following query works in SQL, but somewhere in the LEFT JOINS area, Access gets a little confused and says I'm missing an operator. SELECT Tariffs.TariffCPUCID, Tariffs.TariffID, AdviceLetters.ALCPUCID, Tariffs.ALID...
  18. D

    Check to see if a file exists

    I need to do a simple check to see if a file exists. Ie - If C:Myfile.doc exists Then a else b end if The reason I need this is I'm creating an XML file, but the script I'm using only appends to the end of the file, rather than overwriting it. FYI, the script is: Set fl = New...
  19. D

    Access/SQL: record saves when I run macro or code

    I am running an Access interface to a SQL server. When I run a macro or code, the form saves the current record and moves to a new line. Any idea why this is happening or how to work around it?
  20. D

    Change text of duplicate records in report?

    Posted this over here since I thought the answer might require VB: I know that I can hide the duplicates in my report, but I really need to change the text of the duplicate to say something else. Right now I have a text box in my report set to: =[Name] & " - " & [Description] I would like the...
Top Bottom