Search results

  1. T

    Searching in Subforms

    OK. Check the attached db out. In there, you can search the subform by field name or all with wildcard criteria. Click Here to download the sample db.
  2. T

    Searching in Subforms

    There are several ways to do the search. You can try FindRecord method as showed below. Just set Focus to your subform and do the Find. Me.YourSubFormControlNameHere.SetFocus DoCmd.FindRecord "abc", acAnywhere, False, acSearchAll, False, acAll
  3. T

    Reformating a date

    I understand the last 4 digits, but not the first 3 digits. What 102 stands for? Or it's a typo here?
  4. T

    Display in weekly format

    Try the code below. Function DaysInWeeks(dteMonthYear As Date) As String Dim FDate As Date, LDate As Date, strPrint As String, intI As Integer ' Find the 1st date of this month FDate = DateSerial(Year(dteMonthYear), Month(dteMonthYear), 1) ' Find the last date of this month LDate = DateAdd("d"...
  5. T

    tab events

    You have to use On Change event of the TAB CONTROL, not each single page. Check the code below out. Private Sub TabCtl0_Change() Select Case Me!TabCtl0.Value 'Returns Page Index Case 0 'Page Index for Page 1 ' Run your macro1 here Case 1 'Page Index for Page 2...
  6. T

    Copy photo to Photo Editor

    OK, now I understand your situation. Why don't you check the KB Article at How to Merge Pictures and Text from an Access Table with a Word Document Without Having to Store the Pictures out.
  7. T

    Copy photo to Photo Editor

    If the images are REALLY LINKED, you may check the KB Article How to Retrieve the Path for Linked OLE Objects and also check the thread at Embedded OLE Pictures as well.
  8. T

    Using code to create a new database on a 3.5 floppy

    Make sure you have set DAO in the References. Go to Tools menu>References..> Look for Microsoft DAO 3.X Object Library and select it. Now try the code again and it should work out for you now.
  9. T

    Using code to create a new database on a 3.5 floppy

    Here's how to create a blank db and copy a table to it. Sub CreateNewDB() Dim wsp As Workspace Dim dbs As Database Dim strDBFile As String strDBFile = "A:\NewDB.mdb" Set wsp = DBEngine.Workspaces(0) Set dbs = wsp.CreateDatabase(strDBFile, dbLangGeneral) DoCmd.CopyObject strDBFile, , acTable...
  10. T

    Using code to create a new database on a 3.5 floppy

    Yes, it's possible. Just create the db in your hd first, for the speed sake, then copy the db to a floppy disk when finished. I don't know if Macros could handle this or not. Check the CreateDatabase Method in Help.
  11. T

    XP Question

    I would try, in the new machine, to delete the Calendar and insert in back again. Make sure you name the Calendar the same name of the previous one, then compile it and try if the problem is disappeared or not.
  12. T

    hyperlinks

    Check the thread at Hyperlink Automation You can modify the code to fit your need. Tell me how you come up with it.
  13. T

    Help writing a Function

    Try the code below. Private Sub TextBox2_BeforeUpdate(Cancel As Integer) If DCount("[AnyFieldNameInTable2]", "Table2", "[Field1] = '" & Me.TextBox1 & "' And [Field2] = '" & Me.TextBox2 & "'") = 1 Then MsgBox "Duplicated. You have to find a new id" Cancel = True Me.Undo Exit Sub...
  14. T

    Number of minutes between 2 dates/times

    I have try the bit below and turned out OK. ? DateDiff("n",#10/1/2002 23:59#,#10/2/2002 01:02#) 63 You probably left the # sign out?
  15. T

    Print Code

    You can apply the code you've learned from the link I mentioned above to the write the code behind forms or reports to the text file as well. Access names the the form module with the Form_ prefix to the form name, i.e. if your form is frmForm1, its module is named Form_frmForm1. This system...
  16. T

    XP Question

    You mean you inserted the Calendar ActiveX in your db and when you open the form inserted with the control you can't click on it? You may have the dif versions of the Calendar installed in both machines. I used to have the same problem. I had to register the Calendar 10 in both machines.
  17. T

    Restore database window

    I don't have an answer to your question right now. But I'd like to suggest a workaround for you. Why don't just hide the database window if general users log in and unhide it when you log in. So you don't have to resize it back and forth. Do you still remember the StartupShowDBWindow Property...
  18. T

    Text Colour on Tab Caption

    Check the demo Colored Tab out. Or Tab Control DB And check the thread at Tab Control
  19. T

    Print Code

    Check this KB Article, How to Export All Modules in a Database to Text Files out.
  20. T

    Tab Controls

    Check for Add Method (the first one) in Help. Here's what I took from it, just in case you can't find it. The following example adds a page to a tab control on a form that's in Design view. To try this example, create a new form named Form1 with a tab control named TabCtl0. Paste the following...
Back
Top Bottom