Search results

  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...
  16. S

    Editing data will create new record

    Using code you can store your data and add a new record. AddressField.Locked = true 'user not allowed to modify field On_DoubleClick event of AddressField: Dim NewName as string, NewSurname as string Dim NewAddr as string NewName = [namefield] NewSurname = [surnamefield] ... NewAddr =...
  17. S

    Code to Tab Between form and subforms

    When you use a subform the syntax to identify it is Forms![mainform]![subformName].form In your case: Forms![MainForm]![RPD].form![ALT2_NGR] Be sure that the subform is really called "RPD" in your main form Hope this helps you, S.
  18. S

    Office Links- Analyze w/ Excel

    take a look on Forum\Reports\Excel transfer and format by Ack posted 04/12/2000 Bye, S.
  19. S

    Reports

    On your report " On Open" event try this code: select case [cool] case 1 label1.caption = "X" case 2 label2.caption = "X" case n labeln.caption = "X" end select
  20. S

    Place Calc'd Form Field to New Record in Table?

    Using macro you can create a "micro" add_entry form containing only the field you need: openform "microform" set value productID_microform = forms![formname]![text12] close form "microform" Using code: Dim db as database, rec as recordset set db = currentdb() set rec =...
Top Bottom