Recent content by S

  1. S

    Cust Report off Form

    Hy Scott, You can use a query (the same used for the form) including in Customer field parameter row: [Customer] = Forms![YourFormName]![CustomerControlName] It will be works (pay attention: when report will be opened form must be opend too). Bye, S.
  2. S

    Add new record

    On Click event of your button use this code: DoCmd.OpenForm "FormName" DoCmd.GoToRecord acDataForm, "FormName", acNewRec DoCmd.Close acForm, "CurrentFormName" Bye, S.
  3. S

    Looping through Checkboxes

    Try to use this code: If Ctl.Parent.Value = True Then Thanks a lot, reading your code new ideas born im my mind. Bye, S.
  4. S

    Numbers to Text for cheques

    Sorry Beady, there was a mistake; the function you nedd is "Mid" and not "Left": Dim Que As String Que = Mid([FieldName], 1, 1) & " hundred, " & Mid([FieldName], 2, 1) & " tens and " & Mid([FieldName], 3, 1) & " pounds" MsgBox Que This code works if you have always hundreds; you need select case...
  5. S

    Numbers to Text for cheques

    Hy beady, try this code: Dim Que As String Que = Left([FieldName], 3) & " hundred, " & Left([FieldName], 2) & " tens and " & Left([FieldName], 1) & " pounds" MsgBox Que If you want to be more accurate you can use Select case option to discriminate between 1 hundred and 2 or 3 hundreds, or to...
  6. S

    open form command button

    You can set the origin form2 as a query that select records using: [Field1] = Forms![form1]![field1] [Field2] = Forms![form2]![field2] Bye, S.
  7. S

    Reporting a limited group of Records

    If [Job #] isn't a numeric field but is a text ones you must add "" between Que (string from inputbox); Chr(34) is Ansi code to generate ""; try this code if you have an Runtime error using the previus post code. Dim Que As String Que = InputBox("Input Job #") Que = "select * from Mary where...
  8. S

    Reporting a limited group of Records

    Dont use the query, just change the word "tablename" with the real name of the table your "cost query" works on; for example having a table named "Mary": Dim Que As String Que = InputBox("Input Job #") Que = "select * from Mary where ([job #] = " & Que & ");" Me.RecordSource = Que
  9. S

    Reporting a limited group of Records

    Try this code on your report "On open" event: Dim Que As String Que = InputBox("Input Job #") Que = "select * from tablename where ([fieldname] = " & Que & ");" Me.RecordSource = Que Set the table as report source. Hope this helps you, Bye, S.
  10. S

    TransferDatabase

    Try to Inport (appending it) in the source database the destination table and run an "appending query" to copy records from source table to appended table; it will be works. Bye, S.
  11. S

    Locking the focus of a control until some data is entered in that control

    Depending on number of controls: Set the over control to locked or not visible, on "after update" event of your main control: Control1.locked = false Control2.locked = false ... or Control1.visible = true ... Then "On current" event of your form: MainControl.Setfocus Control1.locked = true ...
  12. S

    message box does not appear

    System intercepts the error befor your macro starts; cancel the restriction on the table, then on AfterUpdate event of your control (called Dat) try this code If Format(Dat, "dd/mm/yyyy") <> Dat Then MsgBox "Date Format not correct, admin will correct your mistake" dat = format(Dat...
  13. S

    Showing Drawings

    Select case GroupEquipment Case "FirstGroup" Sketch1.visible = true Sketch2.visible = false Case "SecondGroup" Sketch1.visible = false Sketch2.visible = true Case else Sketch1.visible = false Sketch2.visible = false End select This will be works if you want to print a single group...
  14. S

    Changing combo box search field by using option buttons

    Having option1 as Optiongroup and CC as ComboBox: select case option1 Case 1 CC.RowSource = "TableName1" CC.ColumnCount = 2 'Number of columns allowed CC.BoundColumn = 1 'Column linked CC.Requery Case 2 CC.RowSource = "TableName2" CC.ColumnCount = 2 'Number of columns allowed...
  15. S

    Text export formatting problem

    dim db as database, rec as recordset Set db = CurrentDb() Set rec = db.OpenRecordset("qq", DB_OPEN_DYNASET) 'QQ = TableName rec.MoveFirst dim Inte as Integer, que as string Do Until rec.EOF Inte = 6 que = rec![firstfield] Inte = 6 - Len(que) rec.LockEdits = False rec.Edit...
Top Bottom