| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 48242 | 2004-08-17 23:14:00 | How do I call a VB function from Access? | scarlettnz (2239) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 262680 | 2004-08-17 23:14:00 | I'm attempting to write a VB function that will calculate the number of working days between two dates. I think I've got that sorted, but can't work out how to call it from Access. Access help says to set the text box control's DefaultValue property to the name of the function. I've done this, but when I then try and save the table, I get an error message telling me that the function doesn't exist. Grrrrrr. Does anyone know what I'm doing wrong as this is driving me insane. |
scarlettnz (2239) | ||
| 262681 | 2004-08-17 23:36:00 | Hi, Im not entirely sure but if you created a function in VB (as opposed to VBA) then you would probably need to create a reference between the library and Access by selecting Tools|Macro|Visual Basic Editor to get to the VBE, then selecting Tools|References. You could of course write a VBA function that you could use directly in Access. |
parry (27) | ||
| 1 | |||||