Search results

  1. P

    Changing a table

    I have been working on a copy of a database to introduce some new forms and data fields. The major data change is an increase of 10 more fields to one particular table. I now want to implement the change to this table, ie put the data from the live version of the table, which has more records...
  2. P

    Prevent moving to the next control

    I am testing the date entered in AfterUpdate of a control and want the user to re-enter it if conflicts with existing data. I have coded the testing and bring up a yes/no message box if it does not comply and want the focus to stay on the control if they answer No (7). I have tried using...
  3. P

    SubForm NOT moving to next record

    I want to stop moving to the next record when leaving the last control on a subform. I plan to build a simple message box giving the choice between allowing the move or moving the focus to a control on the open record. Just setting the focus where I want it does not accomplish it, it still...
  4. P

    Opening and closing Recordsets

    In a Form, subform, subsubform situation is it acceptable to Set and Close the db and the recordsets on opening and closing the main form? It just seemed to me to be a faster than closing them each record, then opening them again for the next.
  5. P

    Error 2465 'Access can't find the field.....

    I am getting this error when I try to update a control on a form from a control on an open subform. The subform has a button which open this new form and in a GotFocus event I have the following code: If IsNull([inspect_equipno]) Then Me.equipno = Forms![Call Entry]![Equipment...
  6. P

    Sub Sub Form OnCurrent looping twice

    I have added some new code to some I wrote a long time ago and during debugging it I found that the On Current code was being actioned twice. Is that normal? I used a breakpoint and stepped through the code and there does not appear to be any code run elsewhere between the 1st and 2nd pass?
  7. P

    Too few parameters, expeced 1.

    I am getting this error on a simple SQL statement StrSql = "SELECT * FROM Equipment WHERE [equip_index] = Me.[calls_equip_sno]" Set StrDb = CurrentDb() Set StrRst = StrDb.OpenRecordset(StrSql) both [equip_index] and Me.[calls_equip_sno] are Long Integers Where am I going wrong?
  8. P

    Making Word the active window

    I have some code on the click of a button of a form which checks for the existence of a word document and if it is there starts word and opens the document. imagerecno = Trim(Str(return_no)) strDocName = imagerecno & ".doc" FullPath = "Z:\Database\2000\Returns\Docs\" & strDocName 'Check folder...
  9. P

    Timing code

    This is probaly known to the gurus on this forum but it came as news to me when I was searching to a solution for another problem. There is a timer available in Access which you can use, for example, to time the speed of your code, which can be as accurate a 1ms. It can be declared where you...
  10. P

    Repeated use of a report

    This is related to an earlier post I made, but I have now moved on to the printing stage. To recap I have Price lists for 10 products for 6 customers whch are usually printed in sets, a couple of times a year, The reports are all the same differing only by the customer, their discount and the...
  11. P

    Combining queries using SQL

    If a query is based on two other queries, how is that actioned in vba using SQL? SQLqry1 = "SELECT....." SQLqry2 = "SELECT...." SQLQty3 = ?? (Selecting all the of results of SQLqry1 and SQLqry2) DoCmd.OpenQuery SQLQry3 Thanks
  12. P

    DLast not showing correct values

    I know that Dlast DFirst etc do not always return the first and last record if you use them on a table, but they are supposed to work on a query that has been sorted. However I have one that doesn't! There are 3685 records all shown in the correct order when I view the query but the DLast...
  13. P

    SQL Syntax

    Can someone please advise the way to include the quotes for a path in a SELECT INTO IN FROM statement. The following does not seem to like the path section? StrSQL = "SELECT Parts.* INTO [Parts Old] IN 'Z:\Database\2000\Service2k.mbd' FROM Parts;" Cheers
  14. P

    Creating a new record

    I am looking for suggestions on how to code this: I have a table that contains some base information used in pricing parts for various customers. (table SetupData) Everytime there is a price increase or change of terms I add a new record to the table and move my 'current record' flag (Yes/No)...
  15. P

    Access 2007

    Has something changed in the way queries are written in 2007? I am using it in 2000-2003 mode as I am working on someone else's database. I contructed a simple query using design view to Select a record from a table and Access complains about a syntax error. Syntax error in query...
  16. P

    Passing data into vba from a form

    I have some code running from a button on a form. It runs several queries updating records and outputing some text files. I want a neat way of passing a date into one of the queries. Does anyone have a suggestion? Thanks
  17. P

    Maintaining data format

    I am using a Make Table query and it incudes the numeric value of some barcodes. They are 13 digits long. I have tried formating the selected field with 0000000000000 in the query but it insists on recording it in scientific format. I can then alter it in the table, but as I want to export the...
  18. P

    Merge fields show as O

    Office 2010, merging address lines from Excel into a Word document. Some, not all address lines of an address come in as Os. The Excel cells contain text and are formatted as text. I am really puzzled. Can anyone help, please !!
  19. P

    Linked pictures

    I have searched the forum but not found something that matches my requirement. I have FE BE networked db using A2003 Images are stored by users in a specific folder which is one level below the BE db. They name them with the reference number asociated with the item. For example DA2345. They are...
  20. P

    Changing forms Cycle setting

    I have a Form with a subform. The subform can have several records relating to the form but usually has only one. I want to stop the subform allways rolling onto the next blank record when the user tabs out of the last field, the cycle setting should do that. I built a short message box and if...
Top Bottom