Search results

  1. A

    Send form to back

    I'm not sure if you can do this directly, but you can accomplish the same end result by opening Form2 as you normally would, and then immediately calling Form1.SetFocus to switch the focus back to the first form.
  2. A

    how to change Value of listbox in VBA

    I need to manipulate an Access 97 listbox in VBA code. The only way I've found to do this is with code like: MyListBox.Selected(4) = True which will select the fifth item in the listbox, and de-select whichever item was previously selected. So far so good. However, when I then refer to the...
  3. A

    DO While Loop

    When you use the While clause, the loop is executed only as long as the condition remains true. When you use the Until clause, the loop is executed only as long as the condition remains false. In either case, execution of the loop stops when the value of the condition changes. If you place...
  4. A

    Is this possible?

    You can set the form's TimerInterval property to something appropriate (500 milliseconds seems to work nicely), and then use the OnTimer procedure to make the text box flash. The flashing may be accomplished by changing the text box or label's ForeColor and/or SpecialEffect property. You'll...
  5. A

    Updating record from previous record details

    Use DAO objects to traverse the entire table, and modify field values as needed. Your code might look something like this: Sub FixTable Dim dbs as Database, rst as Recordset Set dbs = Currentdb Set rst = dbs.OpenRecordset("MyTable") Do While Not rst.EOF <do necesary calculations and...
  6. A

    getting SQL Server table properties via DAO

    In the following code, there are two "Set dbs =" statements, only one of which is uncommented at a time. When I use the first one, the code works and accurately reports the total number of tables in the current database, along with the name and update date/time of the most recently and least...
  7. A

    Urgent-Create Link in code

    Check the online help for the CreateTableDef method. Click the Examples link and review the examples, particularly the last one, which deals with connecting a linked table.
  8. A

    compare/sort order

    Thanks, Pat. This leaves me with two more questions: 1. If I base the record set on a literal SQL statement, rather than a query, will its ORDER BY clause be in force? 2. Assuming that records are being returned in key order, it seems that key order means (at least in some cases) that case...
  9. A

    compare/sort order

    Upon further reflection, my guess is that the default (and apparently undocumented) comparison protocol removes special characters before comparing two strings, which would account for the "False" produced by the last two lines. For my current project, I'm going to write a byte-by-byte...
  10. A

    compare/sort order

    I'm using Access 97 under Windows XP, with all Control Panel "locale" options set for the US. I'm reading records from a linked table (in another Access 97 database) using DAO, and it is crucial that I access them in key order. Access won't let me open the Recordset as any type that permits...
  11. A

    invisible validation rules

    Thank you, Pat! That was the magic bullet I needed.
  12. A

    invisible validation rules

    I have an append query which, until a few hours ago, ran fine. Now when I attempt to run it, it always fails with a message saying that the records which should have been added were not, due to validation rule violations. However, the table that's being appended to has NO validation rules...
  13. A

    erratic cursor movement and character replacement in code window

    Are you saying that one piece of offending code (possibly in another module) may be what's causing difficulty in editing another piece of code? If so, will editing the offending code so that it no longer raises an error solve the problems with editing the other code?
  14. A

    erratic cursor movement and character replacement in code window

    Rich, I'm not sure what you're suggesting. I could put a break point in the code, but the problem is not anything that happens when the code is running (which is when break points are operative). Rather, the problem is the behavior of the cursor while I'm editing the code.
  15. A

    erratic cursor movement and character replacement in code window

    I'm encountering a weird phenomenom: when attempting to edit VBA in a particular modal form's code module, Access begins making changes to my code before I finish a line. Spaces are added or deleted, the cursor (insertion point) is moved, and capitalization is inserted or removed. This makes...
  16. A

    how to manage 60 controls in single form?

    Another option is to place a tab control on the form, and divide the buttons between several appropriately labeled tabs.
  17. A

    Have you seen this error before

    Just a wild guess, but this may be due to either (1) a broken reference - with any code module open, check Tools, References for problems; or (2) the ActiveX control may not be properly registered.
  18. A

    Open Form upon Login

    Set up an AutoExec macro. In it, call a function in a standard module. In that function, determine which group the current user belongs to, and based on that open the appropriate form, using DoCmd.OpenForm. In Access help, you can find explanations of AutoExec macros and the OpenForm method.
  19. A

    Assigning an autonumber to a subform

    I can't really tell what's happening from your description, so I'll guess at what you're trying to do and give suggestions based on that. It sounds as if each client may have multiple invoices, and each invoice may have multiple entries (line items?). If so, you may need to set up a second...
  20. A

    Assign values to create unique index

    I see at least two approaches to this: 1. Having two tables in a one-to-one relationship is only necessary in special cases: you need more fields than Access will allow in a single table, security considerations for splitting the table, substantial storage efficiency to be realized with two...
Back
Top Bottom