Search results

  1. C

    extrating a number

    Huh?
  2. C

    Preventing Duplicate Records

    oops. I left out the dirty part. Dim db As Database Dim rst As Recordset if me.dirty then Set db = CurrentDb Set rst = db.OpenRecordset("Select * from dbo_INV_INFSVC where CS_NUM='" & txtCS_NUM & "'") If rst.EOF = False Then MsgBox "Duplicate ID!" End If end if End Sub
  3. C

    Preventing Duplicate Records

    That's why it's not working. Use this: Private Sub txtCS_NUM_LostFocus() Dim db As Database Dim rst As Recordset Set db = CurrentDb Set rst = db.OpenRecordset("Select * from dbo_INV_INFSVC where CS_NUM='" & txtCS_NUM & "'") If rst.EOF = False Then MsgBox "Duplicate ID!" End If End Sub
  4. C

    Preventing Duplicate Records

    Can you explain what didn't work? Did you get an error? Did you try stepping through the code? Try: Private Sub txtCS_NUM_LostFocus() Dim db As Database Dim rst As DAO.Recordset if me.dirty then Set db = CurrentDb Set rst = db.OpenRecordset("Select * from dbo_INV_INFSVC where CS_NUM=" &...
  5. C

    Preventing Duplicate Records

    in the lostFocus event of the textbox try something similar to this code Sub Textbox_LostFocus() dim db as database dim rst as recordset set db=CurrentDB Set rst=db.openrecordset("Select * from YourTable where ID=" & textbox) if rst.eof=false then msgbox "Duplicate ID!" end if end sub
  6. C

    extrating a number

    I have written a function that extracts a numeric string from a passed in string. Function getNumber(strIN As String) As Integer Dim strOut As String Dim i As Integer Dim sLen As Integer strOut = "" For i = 1 To Len(strIN) If IsNumeric(Mid(strIN, i, 1)) Then strOut = strOut &...
  7. C

    Export query results into another db

    The SQL statement for the MakeTable query in the other db looks like this. SELECT [Build Jobs Query].* INTO myTable IN 'C:\Path and Name of your DB.mdb' FROM [Build Jobs Query];
  8. C

    Export query results into another db

    Public Sub RunMakeTableQuery() Dim dbs As Database Dim qdf As QueryDef DoCmd.SetWarnings False Set dbs = OpenDatabase("c:\db1.mdb") ' Create QueryDef object. Set qdf = dbs.QueryDefs("qryMakeMyTable") ' Run QueryDef. qdf.Execute DoCmd.SetWarnings...
  9. C

    Export query results into another db

    I don't think you need to create another instance Access to accomplish your goal. I was working on a solution, but I think I'm going to back away because my idea is in a bit of a different direction than the way your code is currently written.
  10. C

    Export query results into another db

    Kind of. But a little backwards (I think). The poster is working in db1. The query is in db2. The poster can't modify db2. I think she needs to create a query in db1 that inserts the records from db2 into a table in db1.
  11. C

    Export query results into another db

    I'll work on a sample.
  12. C

    Export query results into another db

    I think she is saying that she can't modify the query. What type of query is Build Jobs Query? Make table? Select? If it is a select query, you can create a new query def in code to duplicate the query from the other db on the fly (so it would always be that same no matter how the other group...
  13. C

    Export query results into another db

    Try linking the table from db1 into db2 and design the query to update the linked table.
  14. C

    How can I make this typing game / quiz?

    This should get you started.
  15. C

    Use filters on a subform like in excel.

    Your welcome. ~Charity
  16. C

    tracking copies of the same record

    Off the top of my head, it seems like the normalized database design would be two tables. One table to store the unique film ID, and another table to store the film descriptions. Like this tblFilm FilmID DescriptionID tblFilmDescription DescriptionID FilmName FilmRunningTime etc. etc. Join...
  17. C

    Use filters on a subform like in excel.

    Try this one: The user selects the Filter type (By Patient or By Drug) If "by Drug" is selected, the user can then select a drugname. The records are filtered by drug name, and the user then has the option of selecting a "from" date. If the "from" date is selected the records are filtered to...
  18. C

    Use filters on a subform like in excel.

    I have an idea that I will work into the sample. I'll try to get it posted today for you to take a look at.
  19. C

    Use filters on a subform like in excel.

    Try this one I converted the db from 2002 to 2000, hopefully this will work for you.
  20. C

    Can't remove "input mask" in MS contact table

    Make sure there is not an input mask on the form field. Look at the Data tab of the properties menu for the textbox used to enter the phonenumber, and you should see an InputMask property.
Back
Top Bottom