Search results

  1. C

    Recordset

    My apologies. :o I assumed by looking at the code you provided that you were trying to use ADO to apply a new Field (column) into a Table then populate that new Field. The code I provided does exactly that. It does not create a Table. ;) I am still assuming that you are trying to use ADO to...
  2. C

    Recordset

    This does the same thing: Dim StrgSQL As String DoCmd.SetWarnings False StrgSQL = "ALTER TABLE [YourTableName] ADD COLUMN fName TEXT(50);" DoCmd.RunSQL StrgSQL StrgSQL = "UPDATE [YourTableName] SET fName='Whatever You Want'" DoCmd.RunSQL StrgSQL DoCmd.SetWarnings True .
  3. C

    Run Function Every 2 hours

    Ok then....attached is a small MS-Access mdb file I quickly punched together to demonstrated the use of the SetTmer and KillTimer API Functions for your particular (and other) requirement. Look at the code within the modules. It may look like a lot of code but it really isn't. There is a lot of...
  4. C

    By-pass dialog w/print to .pdf

    If what you are doing is converting your Reports to .pdf then perhaps try the class from Stephen Lebans which can be found here. I use this module and the DLL's quite often and I personally think it works quite well. There are two DLL files which must accompany the Database but this is minor...
  5. C

    Run Function Every 2 hours

    If your Database is always up and running then you could use the SetTimer and KillTimer Windows API functions. If you need a sample how to do this then just let me know. If your Database is not always up and running then you can Use the Windows Scheduler to fire up Access at a specific time...
  6. C

    Validate using control tag

    Because you have no record navigation within your specific form, the best location for the Code is within the OnUnload event for that Form. I have placed the Code into a Function named CheckControls which is private to the Form. This function returns Boolean True if the User would like to...
  7. C

    Validate using control tag

    I don't have a clue what you mean by this. If you tell me what the Error actually is then I could most likely determine real quick what the problem is rather than having to download, decompress, and run the Database. :) I will look at the Database now and get back to you. .
  8. C

    Button to stamp users details based on windows username

    Well, you could try this: Create another new Table and name it tblRecordAuthorization. This table would contain the Fields: RecordAuthID (AutoNumber - PK) - Caption: Authorisation ID RecordID (Number - Long Integer - Indexed (Yes Duplicates OK)) - Caption: Record ID AuthorizationDate...
  9. C

    Validate using control tag

    You would do this in the section where the Message Box is displayed, like this: 'If there is a Message then we obviously have issues. 'Inform the User, cancel the update and or Form closure. If Msg <> "" Then Msg = Msg & vbCr & vbCr & "Would you like to fill in the above mentioned Field?"...
  10. C

    Email Button

    In the one string alone you had used two keywords. Now would be a excellent time to go through the rest of your Database code and see if more of this sort of thing is lurking there. If you get into the habit of prefixing your names with the abbreviation of what they are then you should never...
  11. C

    Validate using control tag

    The air code above was written with a Bound Form in mind. In VB I would attack this in a slightly a different way. As you mentioned, VB Forms do not contain the BeforeUpdate event therefore I would place the code into the Form's Unload event. A Form Wide Boolean variable would be created so...
  12. C

    New record at top of list

    uhhhh.....I see now and the answer to the best of my knowledge is No but, you can simulate the effect. It's far better to talk your client out of this idea. .
  13. C

    Email Button

    What about Section? That is also a Keyword :) .
  14. C

    DLookup Help

    In a Continuous Form.....If you disable one the Command Button for one record, you disable it for all records. The best you can do is make it non functional through the Command Button's OnClick event: Private YouCommandButtonName_Click() 'If the query has picked it up then get outta here...
  15. C

    Email Button

    Well...the problem here the word Post which I assume is the name of one of your Controls within Form. Post is a Keyword and is used in VBA. Post is a Method of the PostItem Object and therefore can not be used in the fashion you are using it. This is all to common a problem where developers...
  16. C

    Validate using control tag

    For each control on the Form you want to check to ensure data has bee placed there, place a string in each Control's Tag property that describes what the Control is for....for example let's say the Option Group contains Radio Controls (option buttons) for a Type of Injury and the Option Group...
  17. C

    New record at top of list

    Display your records in Descending order. Go into the Form's Code Module under the OnOpen event and enter something like this: Me.OrderBy = "[Customer ID] DESC" Me.OrderByOn = True In this example the form is sorted based on the Table field Customer ID and the DESC added in the string tells...
  18. C

    Populating ComboBox from Yes/No checkbox

    When a Check Box is selected (regardless of which one) have only the Categories Combo Box enabled and the other two Combo Boxes disabled so that selections can not be made from them until a selection is made from the Categories Combo Box which ultimately then populates the Behaviors Combo Box...
  19. C

    Checking staff against booking date?

    As you have already gathered, you are going about this a wee bit backwards. If you have multiple Table Fields to check across then use those Fields within the criteria of the DLookUp function. Mind you his wouldn't help you a whole lot in this particular situation because you want to know which...
Back
Top Bottom