If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#31
|
|||
|
|||
Integrating the code for a max.date function with a check box controlling it and
Hi Guys
Sorry about the late reply, don’t have access to the net from home. But the good news is that this morning I have managed to get it working in all the ways I hoped that it would. I can’t thank you both enough; or everyone from access monster over the last few months. Seriously I would buy you guys a beer if I lived in the same state or for that matter the same country. Thanks again. P.S. I am sure that I will be back asking for help when it crashes as soon as someone tries to do something I didn’t expect. Ken Snell [MVP] wrote: A function that would delete records from a specific table would be this (pass the name of the table to the function): Public Function DeleteRecordsFromTable(strTableName As String) As Boolean Dim dbs As DAO.Database On Error GoTo Err_Handle Set dbs = CurrentDb dbs.Execute "DELETE * FROM [" & strTableName & "];", dbFailOnError DeleteRecordsFromTable = True Exit_TheFunction: dbs.Close Set dbs = Nothing Exit Function Err_Handle: DeleteRecordsFromTable = False Resume Exit_TheFunction End Function A function that would run your 'append query' would be this (pass the name of the query to the function) -- note that this same function will work if you pass the name of a 'make table' query to the function: Public Function AppendRecordsToTable(strQueryName As String) As Boolean Dim dbs As DAO.Database On Error GoTo Err_Handle Set dbs = CurrentDb dbs.Execute strQueryName, dbFailOnError AppendRecordsToTable = True Exit_TheFunction: dbs.Close Set dbs = Nothing Exit Function Err_Handle: AppendRecordsToTable = False Resume Exit_TheFunction End Function Hi Ken, Thanks keeping an eye on the thread I appreciate it [quoted text clipped - 34 lines] Thanks mate -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...eries/200510/1 |
#32
|
|||
|
|||
Integrating the code for a max.date function with a check box controlling it and
Congratulations!
-- Ken Snell MS ACCESS MVP "Chris W via AccessMonster.com" u12677@uwe wrote in message news:55f391158b55c@uwe... Hi Guys Sorry about the late reply, don't have access to the net from home. But the good news is that this morning I have managed to get it working in all the ways I hoped that it would. I can't thank you both enough; or everyone from access monster over the last few months. Seriously I would buy you guys a beer if I lived in the same state or for that matter the same country. Thanks again. P.S. I am sure that I will be back asking for help when it crashes as soon as someone tries to do something I didn't expect. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
More Duplicate E-mails Outlook 2003 | John Smith | General Discussion | 36 | January 8th, 2007 05:36 PM |
Attn: Ken Snell - Displaying chemical structures in Access | Michele | General Discussion | 11 | May 13th, 2005 07:19 PM |
Automatically up date time in a cell | Mark | General Discussion | 5 | May 12th, 2005 12:26 AM |
*Another* OLK 2002 sendmail/SMTP problem | steviegb | General Discussion | 11 | March 23rd, 2005 12:59 AM |
OLE Object- the real question | Michelle | Using Forms | 18 | February 28th, 2005 04:04 AM |