Search results

  1. D

    Date Reminders

    Okay, two things... First make the function public by defining it like this in the module.. public function datecheck() Second, make sure there are () around the datefunction in the RunCode action of your AutoExec macro.. like datecheck() These two solutions should work for you. Doug
  2. D

    Date Reminders

    alright, your problem is that you have to name the function datecheck(). It doesn't matter what you name the module, it just has to have a different name than the function. Hope that helps.. Doug
  3. D

    Assigning a value to primary key

    Put the following code in the beforeupdate event of the txtNum field. dim MyRecs as recordset dim MyDB as database dim MySQL as string MySQL = "SELECT * FROM [Table] WHERE txtNumID=" & int(me("txtNum") & "20") set MyDB = currentdb set MyRecs = MyDB.openrecordset(MySQL) if not MyRecs.eof then...
  4. D

    Append a header in a text file

    This is a down and dirty way to do it. You're going to transfer the original file like you would normally.. Then you open a new file for output(FileName1) and the transferred file for input(FileName2). You put the header into FileName1 and then copy the contents of FileName2 into FileName1...
  5. D

    date problem

    or you could use a function for it... Try this... The function takes in a start date and an optional end date.. if the end date is missing, then it will default to current day.. Public Function NumDays(StartDate As Date, Optional EndDate) As Integer NumDays = 0 If...
  6. D

    Help on Action property in VB to specify operation on an OLE object

    If you have a form with a button on it, you can put this code into the onclick procedure... oleVar is the name of the OLE field and FileName is the name of the file you want a link inserted to. ' Set class name. Me("oleVar").Class = "rtf" ' Specify type of object...
  7. D

    Move

    Fred, The move method is used to move to a certain absolute row in a recordset... In this case, the programmer was checking the pressure and if it met the condition, he increased his counter(the variable Record). Then the line PressureTable.move Record-1 will go to the row before what the...
  8. D

    Date Reminders

    Hey, you can always create a table(tblDates) with two columns for date and activity. Then create a module with a function like this.... public function datecheck() dim MyDB as database dim MyRecs as recordset dim MySQL as string 'Make SQL statement to see if any dates in table match current...
  9. D

    User makes up a report

    Ok, this is a tough subject... Here is a solution for you... Kind of rough... and will take some work to perfect... but setup a form with a multi-select listbox(mine's called lstFields). Set the source equal to the field list of the table you're looking for... In my example "Table1". Set...
  10. D

    medical form report

    Run through the checkboxes and build a string with the ones that are true.... dim strMedical dim ctl as control strMedical = "The patient has " For each ctl in Me if ctl.controlType = acCheckBox then if ctl.Value = true then strMedical = strMedical & ctl.Name & ", " end if end if next...
  11. D

    Error #67: Too Many Files

    I have a VBA program I wrote in Access that uses an API call to find a persons Desktop directory. After that, it copies a shortcut off of the network drive and places it on the users desktop using the filecopy command. These seems to work fine on everyones computer except for two users...
  12. D

    SubForm Modules

    Well, I finally figured it out. Thanks anyway. For anyone interested, the line I used was Me![TaskLevel SubForm].Form.FillDefaults where [TaskLevel SubForm] was the subform and FillDefaults was the procedure in that subform.
  13. D

    SubForm Modules

    Here is my situation. I have a form with two subforms on it. What I need to do is run a VBA module that is on one of the subforms from the main, parent, form. I am having problems finding the code that would reference the module on the subform to run it. Any help would be greatly...
  14. D

    Using VBA to add values from one field to another

    Here, try this code. It's very similar to what you had, but it uses the Instr() function to skip past the "+" character. I've tested this and it seems to work with any length number, as long as the sum doesn't surpass the Integer variable limit of 32,767. Hope this helps. Good luck...
  15. D

    Working with a Lotus Notes Database Through VBA

    Okay, here is what I currently have and what I need. I have a database that tracks all transfers processed by my company. Daily, macros run that update all the transfers. After these are updated, I need them to be put into a Lotus Notes Database, so they could be viewed on the web. It's a...
  16. D

    Disable Right-click

    Thank you very much. That seems to simple to have worked, yet it did. I appreciate the quick reply. Thanks. Doug
  17. D

    Disable Right-click

    I was wondering if there is any way to disable the right-click on the mouse? I want to make a relatively secure database. I already hid the toolbars, but someone can still right click on a form or report to go into design mode. I'd rather not create an .mde file to prevent this, if right...
  18. D

    Record Locking

    I'm sorry, it was my fault not to specify. I am using Access 97. I tried the options in the tools->Options->Advanced, and nothing came of it. If anyone can help, please let me know. Thanks Doug
  19. D

    Record Locking

    Okay, I have a form that reads off of a query. My database is shared and on a network drive. Everytime more than one person is in the database, you can't save a record you just inputted into the form. I get the 3260 Error, the Locked by another user error. Even if both people are not in...
  20. D

    Queries With Specific Names

    I have a login form at the startup. From that Login ID, a user's name is given. There is a table that has a list of transactions in it, Adjustment Table. I want to create a table with only records that are for that person, there is a name field in Adjustment Table. How would I go about...
Back
Top Bottom