Search results

  1. P

    Change backcolor field in datasheet view

    Hello again, Thanks Wayne for you reply but I still don't see a way for doing what I want. I'm going to try explain it a little more. Let's try: I have a form and a subform. On the form I only have a field called "Workdate". After the Workdate has been updated a few records are automatically...
  2. P

    Change backcolor field in datasheet view

    Hi again, Is it possible to change the backcolor of a certain field (text field) in a certain record into another color than white when another field in that same record has a particular value and to enable that field then? And this when the form is in datasheet view. Thanks once again. Pascal
  3. P

    Run-time error “3201”

    Hi Pat, Thanks for your reply. As you said, I've managed to move the focus to my subform. So, the code first moves the focus to my subform and than adds new records in my subform with VBA. See my new code with the line I added to move to the subform. Still I have a problem when I try to add...
  4. P

    Run-time error “3201”

    Hello, I have a form and a subform. On my parent form I have a field called “Workdate” and a tab control on which I have put my subforms (on each tab a subform which are all related to the workdate on my parent form). The field “Workdate” is a unique field, so I can’t create double records...
  5. P

    Creating new table in VBA

    Unbelievable, worked from the first time. I can't thank you enough Jon K. Thanks a lot.
  6. P

    Creating new table in VBA

    Hi, I have a table with the following fields : ID, Name, WorkDate, CheckTime ID is a unique number for each employee. CheckTime contains the hour someone comes in or goes out the office. So, each employee has at least two records (mostly four) a day in the table. Example of the table : 1...
  7. P

    Show all fields from a linked table for each record

    About 500 employees.
  8. P

    Show all fields from a linked table for each record

    The "Employees" table is imported from an Excel file as I said before and the only thing I want to do with Access is to make a new table which I can then export again to Microsoft Excel. But, not every employee has for each category input data. And I want to have for each employee all the...
  9. P

    Show all fields from a linked table for each record

    Hi, I have two tables called "Employees" and "Categories". The table "Employees" was imported from an Excel-file. Table "Employees": Fields: "EmployeeID", "Name", "CategoryID", "Field4", "Field5" etc. Table "Categories" Fields: "CategoryID" and "Category". There are 10 categories. Tables...
  10. P

    Changing field order in a table with VBA

    Marion, This time I changed the position of all the fields in the table, including the new ones. In the table design mode all the fields were in the right position but when I switch to normal view there's always another field shown in the first column. Isn't that strange. What could have...
  11. P

    Changing field order in a table with VBA

    Hi Marion, I think you've attached my sample database instead of yours. Pascal
  12. P

    Changing field order in a table with VBA

    Marion, I added my database below so you can see what's happening when running the code. Something strange: the order in the table in design view is different from the order in normal view (after the code has run). And the code is still not putting the fields in the order I want them to. Pascal
  13. P

    Changing field order in a table with VBA

    Hello again Marion, Thanks once again but still my added fields aren't in the right place. I've changed my code following yours, here it is: Function VeldenToevoegen() Dim db As Database Dim td As TableDef Dim Veld As Field Set db = CurrentDb Set td =...
  14. P

    Changing field order in a table with VBA

    Hello again Marion, To answer your question: my table doesn't have a primary key and I don't want to make one of the new fields the have the primary key. Here's my code: Function VeldenToevoegen() Dim db As Database Dim td As TableDef Dim Jaartal As Field Dim Maandtal As...
  15. P

    Changing field order in a table with VBA

    Ken, I think I misunderstood your first question yesterday and answered it with only one time but I plan on adding them on a regular basis. Sorry for this stupid mistake I made. Pascal
  16. P

    Changing field order in a table with VBA

    Already tried Ken but still not the first field.
  17. P

    Changing field order in a table with VBA

    Thanks Marion for your reply. This is exactly what I was looking for. But still a small problem. When I tried your code (td.Fields![MyField].OrdinalPosition = 1) in order to make my new added field the first field in my table I found out that my new added field was still not the first but it...
  18. P

    Changing field order in a table with VBA

    Thanks Ken for your quick reply. To answer your question: it's a one time deal.
  19. P

    Changing field order in a table with VBA

    Hi, I added three new fields in an existing table with VBA. These new fields where all added at the end of the table (after the other fields). Is it possible to add them (or move them) at the beginning or inbetween two other fields with VBA? If so, how can this be done. Thanks already.
  20. P

    Requery subform

    Wayne, Thanks once again. This time it works fine although I've left 2 lines of code you've written it still works fine. This is the final code now: Private Sub cmdFind_Click() Dim db As DAO.Database Dim qdf As DAO.QueryDef Dim strSQL As String Set db = CurrentDb Set qdf =...
Back
Top Bottom