Search results

  1. B

    SQL Server Function Error

    Hi, I have an Access front end with a SQL Server backend and need to able to call a User define function in a query. To do this I need to create the function but I can't get the right syntax. CREATE FUNCTION BCL_GetForeignKeyCode(@param1 as varchar(16)) RETURNS Integer AS BEGIN declare...
  2. B

    doCmd OutputTo excel (trims varchars)

    HI, I have code which exports a table to a spreadsheet. It works fine apart from a Varchar 5000 field (from a SQL server) which is only shows the first 255 characters, when it opens the Excel Spreadsheet. I have checked the orginal table (which is created on the fly) and it has all the data...
  3. B

    Disable Ctrl + ' Keystroke

    I have a client with a front end MDB linked to a backend database. The users are in the habbit of entering a date (in a memo field) using Ctrl + ; keystrokes but occasionally use the apostrophie Ctrl+') instead. This copies the previous record's entry into the memo field on the form. Is there a...
  4. B

    Stop vbProper case happening

    Hi, I have some users who have a capital in their name. E.g MacDougall, FitzRoy etc. Whenever these are in a report it coverts them to Macdougall or Fitzroy. Is there a function to stip it fixing the text, which is correct in the database. Thanks Brian
  5. B

    recordset to Array

    I have some code as follows: to insert a recordset into an array and then loop through it. sSQL = "SELECT imagename FROM tblproducts " Set rstimage = CurrentDb.OpenRecordset(sSQL) If Not rstimage.EOF Then arData = rstimage.GetRows() intCount = rstimage.RecordCount iRecFirst =...
  6. B

    Printing Notifications

    OS XP Pro Office 2003 I have setup an Access 2003 system to print 3 different types of invoice in a print run dependant of the invoice type and this works fine but a notification keeps flashing on screen. To stop this I have gone manually gone into Printers and Faxes, selected File and then...
  7. B

    GotFocus in Control

    I have an Access 2000 database which has the "on enter field" behaviour set to go to start of field, but on a form which has default 0 zeros I'd prefer that the behaviour changes to Select All so that users do not have to delete then enter a number. Any ideas how to do this in the OnFocus event...
  8. B

    Does a Form Field Exist from VBA

    I have a module called by several forms which builds word documents from templates. On nearly all the Forms there is an AccountNumber field but for one this field does not exist. Does anyone know a way of saying something like this: if Field.Exists(Forms!frmName!fieldname) = True then .typetext...
  9. B

    QueryDefs and dates

    I have multiple queries in a search form which when selected change the query in the data using QueryDefs. Set Q = db.QueryDefs("QrySearchEventID") Q.SQL = strSQLHadEvent Q.Close This works fine for the 3 main queries I need to change. These are all then used in a single...
  10. B

    Send file to pinter

    I have an access database which creates an HTML message body and sends the message as an email. This code runs through a loop in a recordset, but if there is no email address I'd like to outpout the message to a printer. I can create the html fine with ... Set objFso = New FileSystemObject Dim...
  11. B

    Numbers in a report

    I have several reports in a networked system. When I run the reports on some PCs the numbers do not show in the reports. All other characters do. If it is a telephone number like +33(0)20 423 4444 this shows on soime PCs as +33(0)20 423 4444 but on a few as + ( ) and I have no clue...
  12. B

    Lookup Table getting Corrupted

    Hi All, I have lookup table "TblLu_Consultants" which has two fields ConsultantID AutoNumber Consultant Text The table is used in two ways, one to store the ID number in another table as a lookup on a Form and the second to store the Consultant Name in the table. They are both used in several...
  13. B

    Swedish Versions of Code Access 97/2003

    I have an application with some queries which have syntax like the following examples Left(fieldname,3) AND Right(fieldname,3) AND UCase(fieldname) AND Mid(fieldname),4,3) The code works perfectly here but when translated to the swedish version it does not like the functions. Does anyone know...
  14. B

    Update Outlook Contact

    I have written the code with help from Microsoft to add contacts to the Oultook Contacts folder from me Acces Db and can also update existing records, but there appear to be some fields which are blocked, such as FirstName and LastName. Does anyone have some nice code to update the Outlook...
  15. B

    Manage a Text File from Access

    I have a text file created by some other software which I cannot get access into but I can import the text file (from the path) to Access with a very somple piece of code: Path = InputBox("Where is the file?") DoCmd.TransferText acImportDelim, , "TableRecords", Path, True This recognises the...
  16. B

    Form Recordset passed to a Report

    I have a Form with a single Text Box, into which is filled a filtered recordset (ClientLST). The idea was to then allow the user to select specific Clients to add to another table. This all works but we now need to produce a report containing the ClientLST recordset. The system takes about 30...
  17. B

    Adding Users from VBA

    I am trying to add new users using code so that the internal Access tables match my own Users table (tblUsers). I use the tblUsers to hold Job Title, Fullname, Tel no etc and use this in reports and merges. The code I use is... Set adoUser = New ADOX.User adoUser.Name = sUserID...
  18. B

    Web Page in a Report

    I have a table with locations in it including the web address of a map. I would like to add the map to a report of that location so that the users can just run the report as a full guide to the location with all the other information they need. I have tried adding the ActiveX Web Browser object...
  19. B

    Visible/Invis on moving between records in a Form

    I have a bound form in Single View. I use buttons to navigate backwards and forwards through the records in a table. Private Sub MoveNext_Click() On Error Resume Next DoCmd.GoToRecord , , acNext End Sub I have some fields that I want to make visible when a check box is ticked, but remain...
Top Bottom