Search results

  1. K

    Updating a field using Access Code

    Public Sub Amend_My_Field() Dim myDb As Database Dim TableName As TableDef Dim TargetDB as string TargetDB = “C:\MyFolder\MyDatabase.mdb” Set myDb = OpenDatabase(TargetDB) Set TableName = myDb.TableDefs![Schedule] With TableName .Fields.Append .createField("Temp...
  2. K

    subReports

    Using the openEvent of the subreport test for the parent name, e.g. pName = me.parent.name If the the report is opened as a report, i.e. not subreport, you will get an error (2452) which you can trap with error handling. Hope this helps.
  3. K

    Tabing Through Form and subforms

    In the last control of each subform use the onExitEvent to setFocus to the control you want, e.g. me.parent![myOtherSubForm].setfocus
  4. K

    Assigning control source at run-time..

    try me![my Field].controlsource = "Field Name"
  5. K

    Hiding the Access Window

    I have found the suggested code, to hide the db window, works okay for Access 97 but not for 2000. Has anyone else experienced the same or is it me?
  6. K

    Updating three tables with one form.

    You could try setting the forms Recordset Type to Dynaset(inconsistent updates). If that doesn't work then use your approach of updating each record with a different tab, changing the recordsource on the tab change event to the appropriate table (query).
  7. K

    AfterUpdate crashes; BeforeUpdate works

    The beforeUpdate is the place to put your code. As your code itself creates an update you are creating a never ending loop, e.g. afterUpdate update, afterupdate update etc.
  8. K

    AfterUpdate crashes; BeforeUpdate works

    The beforeUpdate is the place to put your code. As your code itself creates an update you are creating a never ending loop, e.g. afterUpdate update, afterupdate update etc.
  9. K

    Progress Dialogue Box

    The common dialog control cmdlg32.ocx will give you exactly what you are looking for. I am not sure if this comes only with the developer's version or whether other MS products provide it. If you have the ocx file above, it should be in windows system folder, reference it within your db and...
  10. K

    Renaming file names

    You may find the FileDateTime function useful, and the Name statement, e.g. Name oldname As newname
  11. K

    1 form and three tables.

    I haven't considered the logic of your code but try changing the forms recordset type to'Dynaset(inconsistent updates)'. This will sometimes allow updates to more than one table.
  12. K

    Database Replication

    I cannot be 100% sure but I seem to remember reading that synchronizing using Replication Manager doesn't work with passwords. Can I be inquisitive and ask why you are using replication across a Lan rather than linking the tables.
  13. K

    Recordsource on Sub-report

    I am not sure why you need a sub report to display a heading, assuming I understand your question correctly, why can you not have the heading incorporated into the report bearing in mind that you have report and page headers, plus group headers if you need them. You could then control the header...
  14. K

    Page continuations for reports

    Check that the canGrow property for the field is set true.
  15. K

    picking out text

    Look at the functions Left, Right, mid, instr, instrRev (access 2000). These will allow you to manipulate the data, e.g. A = left(myText,5) If A = "Phone" then .......
  16. K

    How to MOVE a text file after importing it?

    Try: Name myFile As myNewFile
  17. K

    Tab Order in Forms with Multiple Subforms

    To tab out of a subform forward is ctrl+tab, backwards is ctrl+shift+tab. All very user friendly. An alternative is to use the onExit event of the subforms last control to set the focus to another control. e.g. me.parent![mycontrol].setfocus or me.parent![my other subform].setfocus
  18. K

    Confirming Recordset Updates Succeed

    Once you have committed the transaction you cannot roll it back. What I am suggesting is the other side of the coin, instead of checking that the update succeeded check whether it failed. If it failed then rollback. Whilst the beginTrans to commitTrans phase is running record locks have to be...
  19. K

    Confirming Recordset Updates Succeed

    I am not sure that Access provdies 'confirm updates' as some others databases do. Set a boolean true as the first instruction following beginTrans, e.g. transStarted = true. Write all your update code. Perform commitTrans and set transStarted = false (i.e. finished). In your error handling...
  20. K

    Continuous forms - repeating data

    One way that you may be able to achieve what I think you're wanting, is to use a Query as the recordsource and define a fourth field using IIF. You will also have to use the Format function to get the appropriate display, e.g. Field1 is text Field2 is date Field3 is currency in the query...
Back
Top Bottom