Search results

  1. D

    Force a Start Place in a Textbox

    I have a textbox (Odour), that contains one of four words (Cadaver ( ), Drugs ( ), Explosives ( ) or Money ( ) ), the word is written in by pressing one of four buttons, this works fine. I now want the user to write in between the the brackets and only the brackets. For example: The textbox...
  2. D

    Update or CancelUpdate wothout AddNew or Edit

    On the form I have a tab control one tab is called "GP" the other is called "Detection", once I have chosen either GP or Detection from the combobox, the relevent tab appears. as you suggested, Refresh on lost focus did it, many thanks.
  3. D

    Update or CancelUpdate wothout AddNew or Edit

    Ive had search around the forum and have found a few threads about this but cant pin it to anything that Im doing. The error occurs when I choose from a combobox after having chosen a record from a listbox and then choose the same record again from the listbox and then choose from the combobox...
  4. D

    Open a PDF

    That did it, many thanks.
  5. D

    Open a PDF

    Thanks for yoru help, well Im nearly there. I just need to check that the file exists. I searched and foun this code but its not working, it always says the the file dosent exist even when I know it does Dim strhelp As String 'The help folder Dim strHelpDoc As String 'The...
  6. D

    Open a PDF

    I need to open a PDF file from a button, now I know th easy way to do this is via the hyperlink in proporties. The problem is the file may or may not be present. It will always be named exactly the same. I'm assuming that I need to do this in VBA. I have done the code to check if the folder...
  7. D

    DLookUp

    Me.Undo Tried to make it to difficult!
  8. D

    DLookUp

    Right so I have this in the BeforeUpdate: Private Sub DogID_BeforeUpdate(Cancel As Integer) If IsNull(DLookup("[DogID]", "tbl_Profile", "[DogID] = """ & Form![DogID] & """")) Then ' Add ID MsgBox "New" Else ' ID already exists MsgBox "Exists" End If End...
  9. D

    DLookUp

    Thanks for your help. Your right, the ID can be whatever the user chooses, I would have said but I didn't realise that it made a difference. Im not sure what you eant by: "And yes, I did mean to put that may " there." Got to be honest tIm a bit lost with this right now! I know what I want...
  10. D

    DLookUp

    Thanks namliam, unfortunatly that produced a 2471 runtime error (I think it has something to do with some "", but I dont have any idea where the problem is!
  11. D

    DLookUp

    Thanks for your help. This where I am now: Private Sub DogID_BeforeUpdate(Cancel As Integer) DLookup "[DogID]", "tbl_Profile", "[DogID] = Form![DogID]" If Me.DogID = DogID Then MsgBox "This Dog ID is already in use" Me.DogID = Null Me.DogID.SetFocus End If...
  12. D

    DLookUp

    Hi cant seem to find what Im trying to do, which I think is quite simple I have a unique identifier (DogID), its the users reqposibility to put that number in, but I need the code to check the table to see if the number is already in use. I suspect I should be using the DLookUp function. But...
  13. D

    Runtime Error 13

    DoigName is a Subfolder, works once I had put in the & and " and removed the last " Many thanks
  14. D

    Runtime Error 13

    Thanks mate
  15. D

    Runtime Error 13

    Do you mean this bit: \ " & Forms![frm_Profile]![DogName]" It put them in automaticaly
  16. D

    Runtime Error 13

    I'm getting a runtime error 13 on this line of code. Its a piece of code to make a directory, but I cant see anything wrong! strBackUpDogNameFolder = "c:\GPandDetectionDogTrainingLogBackUpsandReports\" & Forms![frm_Profile]![Discipline] \ " & Forms![frm_Profile]![DogName]"
  17. D

    Design Issue

    Thanks for your reply and sorry for getting back to you so late. The problem is that the dog may already be in the clients DB with his unique Identifier, but not in the trainers. The trainer then may crate the dog in his DB and put a different uniique identifier with it. I think this is...
  18. D

    Design Issue

    o ou mean each dogs name should be unique as thats not always going to be possible. The person is a trainer and he has dogs come to him for training from different people, so people could call there dogs the same name.
  19. D

    Design Issue

    Im having a bit of trouble with the design of my DB. The DB is a dog training DB. Each dog has a profile with its breed, Name etc and a DogID (this is an autonumber and is the Primary key) Each dog undergoes training each day and that is recorded on a subform. The subform holds a TrainingID...
  20. D

    Importing Data

    Well I've fixed part of the problem. It was the string, I was only looking for the folder and not the file sSource = "c:\GPandDetectionDogTrainingLogBackUpsandReports\" I created an unbound txtbox to hold the name of the file from the cbobox (txt_ImportName). So the code now reads...
Back
Top Bottom