Search results

  1. P

    Trapping a DLookup error

    Is there a neat way of trapping the error and carrying on with the code from Dlookup when it finds the field it is looking for is empty (not null but empty)? Up till now I have trapped it by its error number then returned back to the code, but there must be better way? Cheers
  2. P

    FindFirst problem

    I am no expert but I don't think you do, but that is taking an example from my reference book! As it happens I do have the Index line, so the Seek will work, which I used to test with. The full code is: Public Function GetReturnRecNos(StrSerialNo As String) Dim rec As Recordset Dim n As Integer...
  3. P

    FindFirst problem

    Thanks for the replies. The tables are linked but I have been working with a local table to debug the code. However I use this code I have found on the web which 'enables' seek and index for linked tables and it works: Public Function OpenForSeek(tablename As String) As Recordset ' Assume...
  4. P

    FindFirst problem

    I am using this for the first time and cannot gett he code to run,it errors with "Operation is not supported with this object" I have seen that before and it has been a format problem, but I can't see it !! The rec.seek line work perfectly ?? Public Function GetReturnRecNos(StrSerialNo As...
  5. P

    Getting a table record name

    Thanks again
  6. P

    Getting a table record name

    Thanks that is brilliant! So I can understand the code can you please confirm that: The Column Names, in long hand, are: DAO.Tabledef.Field.Name And without the .Name it would be looking at the content of the fields. Thanks
  7. P

    Getting a table record name

    Sorry, not row data, all the data in that coloumn!
  8. P

    Getting a table record name

    I said I had probems with the terminology! I want the column name that includes the string "_serialno", I take your point it may not be the 3rd column. With that name I can populate a list with all the row data for the user to select from.
  9. P

    Getting a table record name

    Thans for your reply. Unfortunately the Table names were created inconsistently so it would very hard to build the record names from them. I thought tabledef might be the way to go but have never used it, so I have no idea how to get column name from it. The Table is a linked one, will that...
  10. P

    Getting a table record name

    I want to offer a user Combo box filled with the contents one of the records of a table. The user has already made a selection of the Table required (by selecting an item they are interested in) and its name is available in the VBA code. The problem is I do not know the exact record name. For...
  11. P

    Week Number selection

    Adding the acDialog did it, thanks ! "DoCmd.OpenForm "FrmCalendar", acNormal, , , , acDialog" I have also added the Week No fix, which also is fine, thanks However, weeks 1 thru to 9 don't have their leading zero, is there a format for that or do I have to paste it on in code? Cheers
  12. P

    Week Number selection

    Thanks for your notes on week number problems, we use Sunday as the start of the week so ChrisO your fix will be ideal. I have hit a snag though in my code. The function I have created is the preperation of the next sequence of product serial numbers. It manipulates the last used serial number...
  13. P

    Week Number selection

    It was how I could open just one instance of the calendar that had stumped me. However I have found a solution at this site http://www.fontstuff.com/access/acctut09.htm A site which has given me a lot of very useful solutions, particularly with SQL !!!! Cheers
  14. P

    Week Number selection

    I want to offer users a popup that enables them to select a a week number. The number is then being used to create a product serial number, for a range of products. I have a built a function that generates the Serial number and would like to get the week number when it is running. Can I use the...
  15. P

    Dates as variables in an SQL statement

    Thanks. I was actually replying to G.. Athome, but the info is helpfull. I tend to alternate " with ' to make them more readable, but that is probably because I am not good at typing and less is better! Cheers
  16. P

    Dates as variables in an SQL statement

    Ta. It isn't the count of quotes that trips me, it is knowing to use them! One more question. It looks like I have to reformat the dates to mmddyy, is that right? Cheers
  17. P

    Dates as variables in an SQL statement

    Cheers, I'll try and remember that!
  18. P

    Dates as variables in an SQL statement

    Thanks that is it! It that a rule, variables are always outside quotes?
  19. P

    Dates as variables in an SQL statement

    The code is: strSQL = "SELECT [Analysis Report Query 2].[Post Code], [Analysis Report Query 2].[Visit No], [Analysis Report Query 2].[Serial No], [Analysis Report Query 2].[Date Of Visit], [Analysis Report Query 2].SerialNo, [Analysis Report Query 2].[Job Complete], [Analysis Report Query...
  20. P

    Export to CSV without text qualifiers

    Do you mean a table within the dB? If so do it manaully first and use the Advanced button in the Wizard, this will give you the opportunity to save without quotes and save the parameters to use later in your code. pnb
Back
Top Bottom