Recent content by Robin

  1. R

    Invalid Argument - Error 3001

    Hi, This worked fine for me. Public Function UpdateNames() On Error GoTo UpdateNames_Err Dim db As Database Dim rs As Recordset Dim ct As String Set db = CurrentDb() Set rs = db.OpenRecordset("Query1", DB_OPEN_DYNASET) rs.MoveLast rs.MoveFirst While Not...
  2. R

    OPENMODULE (STRIPSTRING FUNCTION)

    Hello Yankee, Yes you can use the code in a module, you simple send the imput (address) to the function. Thats what src is in the bit that goes Function rt_Strip(src As String) As String and the function returns the answer to the calling code. rt_Strip = tmp so lets say txtAddress is the...
  3. R

    Entering new record into a subform

    Hello sahmad, It sounds to me like you have referential integrity enforced on your relationships and one of the participants does not have a related record in it. Just a thought Robin.
  4. R

    SQL Insert statements for a combobox

    Hello lmangano, Yes this can certainly be done by using a little DAO code in the After Update event of the Combo Box. The code would look something like this. Private Sub cboOwner_AfterUpdate() On Error GoTo cboOwner_AfterUpdate_Err Dim db As Database Dim rs As Recordset Dim ct...
  5. R

    Refreshing data

    Hello Matt, In your query you need to add a field with a type of yes/no (boolean)with a default value of -1 (yes true). In the On Load procedure of the form you could use DCount to see if there are any records with a yes (new) value in this flag. If the DCount comes back as greater than 0 you...
  6. R

    OPENMODULE (STRIPSTRING FUNCTION)

    Hi, I think Chris is right, here is what I use to strip punctuation. Function rt_Strip(src As String) As String On Error GoTo rt_Strip_Err Dim i As Integer Dim tmp As String Dim cha As String If Not IsNull(src) Then For i = 1 To Len(src)...
  7. R

    Script

    Hello Tina, if you are still looking for some code that can download from Word and write away to tables, I have been trying to do that. I have code that will do the job from a text file but Words formatting is giving me a lot of trouble. If you want a copy of the code that works on a text file...
  8. R

    SetValue in a Macro - 2000

    Hello Dave This code works in Access 97 and should in 2000. I have set up four text box controls on a form. The text boxes are named just how Access puts them there (not too meaningful but I trust you'll use better names). In the Got Focus event of each text box the sub BorderHandler is...
  9. R

    Date search

    Hello John Try these functions, they need to be modified but you can get the idea. Public Function FindPos() On Error GoTo FindPos_Err Dim db As Database Dim rs As Recordset Dim SearchString As String Dim SearchChar1 As String Dim SearchChar2 As...
  10. R

    Syntax

    Hello, instead of [Forms]![MainForm]![SubForm].[TextBox] try [Forms]![MainForm]![SubForm].Form.[TextBox] hope that helps
  11. R

    Using Code to respond to negative Values

    Hello Sush, If Not IsNull(Me.txtValue) Then If Me.txtValue < 0 Then Me.txtOtherValue="In" Else Me.txtOtherValue="Out" End If End If This can work off an event, depending what you want to do. Here I've used text box values but you could substitute field values if you want...
  12. R

    OrderBy Form Property

    Hi, Because the properties are set in design, changing them in code only effects this instance of the form. To get the property to stay off till you want it you must set the proprty in code in the same way as you change it in code. Hope that makes sense Robin.
  13. R

    How do I link multiple forms of one table?

    Hello, If your using Access 97, try using the tab control so that you can put many pages on the same form. The record will be the same for each page all the way through. If you need a demo to follow just send me an email and I'll return one. Regards Robin.
  14. R

    update

    Hi, Try setting the table linking criteria to cascade updates. Regards Robin.
  15. R

    Putting current data in a report

    Hello Again Robert, I must say I feel pretty dumb at this stage, I just woke up that you are calling a value from a sub form (I think) so the only thing wrong is: "[OrderDetailID]=" & forms!frmOrders![sbfOrderDetails]![OrderDetailID] should read: "OrderDetailID=" &...
Top Bottom