Search results

  1. T

    Need help changing error text on form input masks

    Yes, check the MS KB acticle, ACC: How to Replace the Default Input Mask Error Message out.
  2. T

    hyperlinks from a field value

    Add a command button and put this code to it. Private Sub Command0_Click() FollowHyperlink "http://www.ncbi.nlm.nih.gov:80/" & _ Me.YourTextBoxNameHere & "=Abstract" End Sub
  3. T

    Hiding column in datasheet view

    Just right click on the form and select the DataSheet View. Then again right click on the field you want to hide and selct Hide Columns. This will hide the column in the Datasheet View.
  4. T

    Tab-Page-Index

    You have to use the OnChange of the tab control to check which page is selected, sthg like this. Private Sub TabCtl0_Change() Select Case Me!TabCtl0.Value 'Returns Page Index Case 0 'Page Index for Page 1 MsgBox "You have selected Page 1" Case 1 'Page Index for...
  5. T

    Why won't my code work

    You typed in the code or you cut and pasted? You'll need space at the end of each SQL line and I prefer Execute method to the one you use. Dim dbs As Database Set dbs = CurrentDb dbs.Execute "INSERT INTO CBUDPresG ( Utility_Type, Month, Period, SumOfCost " & _ "SELECT...
  6. T

    Run code refering table

    You have to open the table and loop thru each record and modify the Query1's SQL on fly. Create code looks sthg like this. Private Sub Export2Xcel() Dim dbs As Database, qdf As QueryDef, rst As Recordset Dim I As Integer, strSQL As String Set dbs = CurrentDb Set qdf = dbs.QueryDefs("Query1")...
  7. T

    Querying the Query tab

    Add a combo box, mine is called cmbQuery and a command button, mine is cmdOpenQuery. Then add the code below on OnClick event of the command button. Private Sub cmdOpenQuery_Click() If Me.cmbQuery <> "" Then DoCmd.OpenQuery Me.cmbQuery End If End Sub And this code on OnLoad event of the...
  8. T

    Convert DAO to ADO

    Have you checked these out yet? DAO_2_ADO ADO Access2002
  9. T

    Copy files based on date modified/created.

    You have to loop thru each file and check for the date. Private Function GetYesterdyFiles() Dim objFS As Object, objFolder As Object Dim objFiles As Object, objF1 As Object Dim strFill As String, strFolderPath As String strFolderPath = "C:\Bam\Renewals\" Set objFS...
  10. T

    Switching from Datasheet to Form View

    Try this out. Private Sub cmdChangeView_Click() Me.YourSubformControlName.SetFocus DoCmd.RunCommand acCmdSubformDatasheet End Sub
  11. T

    Split record

    Check this code out. I assume that your table is Table1. Sub CopyValue() Dim dbs As Database, rst1 As Recordset, rst2 As Recordset Dim I As Long Set dbs = CurrentDb Set rst1 = dbs.OpenRecordset("Table1") Set rst2 = rst1.OpenRecordset If Not rst1.EOF Then For I = 1 To rst1.RecordCount...
  12. T

    Deleting more than 50,000 in macro

    I would use VBA to delete the table. Fast. Try this. Private Sub Command0_Click() Dim dbs As Database Set dbs = CurrentDb dbs.Execute "Delete * From YourTargetTableNameHere" dbs.Close Set dbs = Nothing End Sub
  13. T

    Opinions needed concerning paid programming error

    I prefer to run the code on OnDoubleClick of the SEG text box like this. Private Sub Seg_DblClick() Dim varLookup As Variant, lngMax As Long varLookup = DMax("Seq", "ECNPartstbl", "[ECNBCNVIP ID]= " & Forms![ECNBCNVIPfrm].[ECNBCNVIP ID]) If Not IsNull(varLookup) Then lngMax =...
  14. T

    Delete the Relationships in a back end DB

    If the new field to be added is not the PK or FK, why can add the new field right in the back end. Tell me more about the field, is it Text type or what? Check this code out. Private Sub AddField() Dim dbs As Database, strDBFile As String strDBFile = InputBox("Where is the back end db?") If...
  15. T

    Create Table & Add Data

    What about this? Private Sub Command3_Click() Dim dbs As Database Dim TableName As String Dim strSQL As String TableName = InputBox("Please type a table name, per semester") DoCmd.TransferDatabase acExport, "Microsoft Access", CurrentDb.Name, acTable, "Addchangename", TableName, True...
  16. T

    Opinions needed concerning paid programming error

    You should have signed a MOU or contract and indicated an after-care service. I myself as a freelance developer will normally take care all bugs in my code if there are any and if proved as my fault within one year after the hand-over. The bug you showed here is the programmer's fault obviously...
  17. T

    Disabling New Record Button

    You can use AllowAddtions property like this. Private Sub Toggle14_Click() Me.AllowAdditions = Not (Me.AllowAdditions) End Sub I use a toggle button to enable or disable the Add New button.
  18. T

    Determine if Project is installed

    Try this out. Sub ExistenceProjectCheck() Dim objApp As Object Dim strNotFound As String Const ERR_APP_NOTFOUND As Long = 429 strNotFound = "Project is not installed on this machine. " _ & vbCrLf & "Unable to automate Project." On Error Resume Next ' Attempt to create...
  19. T

    Searching in Subforms

    I guess you use a bound text box as the input text box for keying the string you want to search. I checked you db and I found it's One-To-One relationship. Then I guess what you want is to search the data in the subform and if there is any, move the main form to the record related to the linked...
  20. T

    Scanning documents to a table

    Check this thread, Scan Image out.
Back
Top Bottom