Search results

  1. S

    DCount function

    You could create a query which omits the null entries, and then substitute the table name in the dcount statement for the query name. Also, if you leave the criteria of the statement, I believe it only selects recorder that are not null ie. =DCount("Field","Table") Smed
  2. S

    UK Post Codes - Extracting Area characters

    You could also use In code Area = Left(PostCode, 1) If Asc(Mid(PostCode, 2, 1)) >= 65 Then Area = Area & Mid(PostCode, 2, 1) End If In a query Left([PostCode],1) & IIf(Asc(Mid([PostCode],2,1))>=65,Mid([PostCode],2,1),"") Smed
  3. S

    Date time prob

    Paste the follwing Function into a module : '''''''''''''''' Function tbl_Change_Type(TableName As String, FieldName As String, FieldType As String) Dim dbs As Database Set dbs = CurrentDb dbs.Execute "ALTER TABLE " & TableName & " ALTER COLUMN " & FieldName & " " & FieldType & ";"...
  4. S

    Exporting Data

    After further investigation, it would appear that all I need to do is set a primary key in the paradox data file, however linking to a paradox db via msaccess is only read-only. Anyone know of a way around this ? Smed
  5. S

    Exporting Data

    I am able to export data from a table or query into a paradox data file, but my problem is that I need to create a paradox index file for the paradox data file. The application which uses the paradox data automatically inserts a Autonumber column before the data columns if an index file has not...
  6. S

    Field Lengths

    I have found a solution in dbforums website using SQL Function ChangeFieldSize() Dim dbs As Database Set dbs = CurrentDb dbs.Execute "ALTER TABLE table_name ALTER COLUMN column_name CHAR(field_size);" dbs.Close End Function Smed
  7. S

    Field Lengths

    I have a problem when using an action query to make a new table. Any fields which have additional formatting (eg. Field2: Ucase$(Field1) is automatically sets the field size to 255 in the new table, irrespective of what the original field size or the max length of the new field is. Does...
  8. S

    SQL or VBA to set Primary Keys

    Tim, Originally I coulnd't get it to work. However I realised I had not enabled the "Microsoft DAO 3.6 Object Libirary" reference. Now it works Great ! Thanks Smed
  9. S

    SQL or VBA to set Primary Keys

    Is it possible to either use SQL or VBA to set a table field to a Primary Key, instead of going into design mode. Any help would be great. Smed
  10. S

    Files

    Paste this code into a module and call the function '''''''''''''''''''''''''''''''''''''''''''' Option Compare Database Function Copy_Delete_Files() Dim FileNumber As Integer Dim FileName As String For FileNumber = 1 To 3 FileName = "ABC_01Sep02_0" & FileNumber &...
  11. S

    displaying text in a form

    You could use the RichTx32.ocx "Microsoft Rich Text Control, version 6.0 (SP4)" ActiveX control to display Rtf files on a form. This ActiveX is supplied with VB6 but don't think it is bundled with MsAccess or MsOffice. Check out http://zimacs.zetnet.co.uk/problems/textdisplay.html Smed
  12. S

    Soccer Fixtures

    Shaun I appologise if it is a bit messy but the attach db works. Within the module, specify the number of teams and execute the "CalculateFixture" function. Smed
  13. S

    Format date problem

    Have you checked the regional settings control panel ? If the date format is specified as DD/MM/YYYY then you can use 18/09/02 or 18/09/2002 however if the date format US (MM/DD/YYYY) then it will only work if you use enter 18/09/2002 Smed
  14. S

    How to deal with deleted record

    you could grab the current record number, using the OnTimer event requery the form and move to the last record viewed.
  15. S

    Print 3 almost the same reports for one record......

    Not sure what you've done wrong when print 3 reports See attached db as example Smed
  16. S

    Query Date Teaser!

    Sorry I didn't read the Question properly. If you want to display items who's date checked is more than 20 days from today use criteria: <=Date()-20 Smed
  17. S

    Days of the month

    Try This will produce last day number (dd) of current month =Left(CDate("01/" & (Mid(Date(),4,2)+1) & "/" & Year(Date()))-1,2) This produces last day of current month (dd/mm/yyyy) =Left(CDate("01/" & (Mid(Date(),4,2)+1) & "/" & Year(Date()))-1,2) & "/" & Mid(Date(),4) Smed
  18. S

    Sending mail via Lotus Notes R5 using VBA

    Found this code a BBS, it works with Lotus Notes 4.5. Create a module and paste the following code: Public Sub SendNotesMail(Subject As String, Attachment As String, Recipient As String, BodyText As String, SaveIt As Boolean) 'This public sub will send a mail and attachment if neccessary...
  19. S

    Query Date Teaser!

    In the query put the following criteria in the date field column : >=Date()-20
  20. S

    How do I get the first value returned from a table into a variable

    Homer I had the same problem, and used to have to manually copy a new version to every user machine. I one remeber seeing a small application which sort of worked, but the creator would not publish the source code. So instead, I bought Visual Basic 6 and spent a couple of days writing my own...
Back
Top Bottom