Search results

  1. G

    Replace Function

    Hi there I need so help with the replace function to replace multiple characters in a sting. The replace function syntax is: string1 = replace(sting1, "find", "ReplaceWith") I would like to replace multiple things but I'm not sure of the syntax. string1 = replace(string1...
  2. G

    VB and SQL help needed

    Problem solved I used the max(id) to achieve what I wanted: strSQL = "Select Max(id) as lastID FROM " & strTable
  3. G

    combo box items

    I think you are correct and this can't be done so I used error checking instead. Not sure if this will help anyone but here goes: What I wanted to do was create a check box at run time when the user selects a combo box option. Once the check box was created if the user selected the same option...
  4. G

    VB and SQL help needed

    Hi Does anybody know of a function or sample code that will tell me the last auto increment id from an insert query. I know of a function 'mysql_insert_id' in php but is there something similar in VB?
  5. G

    combo box items

    Hi All Does anybody know is it possible to disable an item in a combo box? I have a combo box with the contents index mapping to primary key records. I don't want to remove any of the contents as this would alter the index. I would like to disable the option when it has been selected to stop...
  6. G

    Data control

    Thanks for the link to the thread, just what I was trying to do. Thanks to you all.
  7. G

    Data control

    I have created the buttons but I want to disable some when the recordset is at bof or eof. But I need the code to check which buttons to enable or disable each time the recordset is moved. I have done this in the reposition event of a data control in VB but not sure if this is possible to do...
  8. G

    Data control

    Hi I'm trying to setup navigation buttons on a form for a user to scroll through the records. I have created a recordset and want these button to be updated when at bof or eof. I have used a data control in VB and put the code in the reposition event. But I don't know how to do this in Access...
  9. G

    Links in excel

    Hi Can anyone tell me how you can view links in Excel? We use a large spreadsheet at work that contains cells that link to other excel documents. Some of these links are incorrect and want to be removed. Is there any way of checking which cell links to which document without selecting the...
  10. G

    Text box and Overflow

    Access 97 didn't understand the round function but I did alter the decimal place and changed to currency and that solved the problem thanks
  11. G

    Text box and Overflow

    Hello I have a text box on a report that calculates a total, control source is =Sum([NetWgt]*([nett]/[paywgt])). This works fine but sometime when I run the report I get the error Overflow. I no this error is caused when a variable isn't large enough ie an integer is used instead of a double...
  12. G

    A footing in the report

    Can you not add the other reports as subreports. This would display all three on one report.
  13. G

    Text Box in group footer

    Is is possible to refer to a text box in the group footer part of a report by name. The text box is named Total and shows a total for each weight in a group. There's five groups so the text box is duplicated five times when the report is run, all showing a different weight total on the report...
  14. G

    Print report from VB

    I have found a way around the problem, cheated a bit but the results are what I want. I closed the connection first then opened it again after the code for the printing had completed. There's a slight flicker in the program but I get my printout. Not sure if this is the correct way to do it...
  15. G

    Print report from VB

    I get an error when trying to open database, because the database is already open. I have a form with a data control on it and text boxes bound to fields in the database. When the form loads the properties of the data control is set and the fields displayed in the bound text boxes. There are...
  16. G

    Print report from VB

    Thanks for the reply I have tried adding .Application and the open database method but because I already have a connection to the database using data control (Connection is made when form loads) eg: Set dbStock = OpenDatabase(gDataBaseName) Set rsStock=...
  17. G

    Print report from VB

    Can anyone tell me how to print a report in Access Database from VB. something like: dim dbStock as database set dbstock = Opendatabase "C:\stock.mdb" dbStock.DoCmd.OpenReport "rptStock", acViewNormal ????? The DoCmd isn't available, is it possible to print a report this way?
  18. G

    Print fields

    Thank you for your help
  19. G

    Print fields

    Hi I'm trying to print fields to a text file, I have managed this no problem but I can only seem to print one field and I want more! I have the following code that uses the print statement Print #ArchiveNo, rsTblStudent.Fields("First Name") I would like to be able to add extra fields so I...
  20. G

    Stop Null in Parameter Query

    I managed to get some code in the after update of a text box to run SQL code to get the required results. Struggled a bit with the SQL code as I'm unfamiliar with it but I agree the results are better. Thanks.
Top Bottom