Here is what I came up with:
Public Function InsertSpace(txt As String) As String
For i = 2 To Len(txt)
If Asc(Mid(txt, i, 1)) < 91 And Asc(Mid(txt, i, 1)) > 64 Then
InsertSpace = Left(txt, i - 1) & " " & Mid(txt, i)
Exit For
End If
Next i...
DoCmd.TransferSpreadsheet(TransferType, SpreadsheetType, TableName, FileName, HasFieldNames, Range, UseOA)
For the Range argument, write the sheet name, i.e... "Sheet4"
YZF, trust me, you don't want to move records up and down in your table... What you want to do is a custom sort.
For that, you need to add a sort field to your table.
After that, you can make some wicked logic in VBA to respond to the users manipulation of the records.
Imagine a listbox...
Just a thought, try this with some of your data...
Left(Trim([PostalCode]),3) & Mid(Trim([PostalCode]),5,1)
...This will ensure you don't have extra spaces surrounding your data.
Why are you using the GotFocus event instead of Change and/or AfterUpdate? Or perhaps you could make a separate sub and use all of the events to run the sub?
I have a terminate date field in the tblCompAssignment (to show that the person no longer has that computer.) You make a good point, though...I should put a terminate employment date in the people table.
I think the answer on the RI is to show terminations in the db instead of deleting...
RE: Circumventing Outlook security warnings...
I have used Outlook Redemption with good results. Also, if you have access to an SMTP server, that's another way to go.
Check out www.slipstick.com for further discussions on the subject.
Make a Sub like this...
Private Sub UpdateButtonState()
If Me.Check5 Then
Me.Command7.Visible = True
Else
Me.Command7.Visible = False
End If
End SubAnd then add events to the Form_Current and CheckBox_AfterUpdate events...
Private Sub Form_Current()...
DoCmd.RunCommand acCmdUndo
DoCmd.Close acForm, "MyFormName"
The undo button can be created using the control wizard, but it doesn't use the above method.
The search function at work...
I searched for 'Subform' in the Code Repository section, and came up with this post.
It will save me (and others) a lot of typing and explaining.
Haven't done this, but...
Use windows ControlPanel/ScheduledTasks to open the db. Make sure you set your macro security in Access to 'Low' to eliminate the need for user intervention. (Speaking of which, are you able to send emails from the db without user intervention?)
Thanks, Pat, for weighing in here. I always value the advice you offer on this forum.
On the subject of RI, if I have a problem related to both a user and a computer, and then I delete the user...I wouldn't want to lose the computer problem history. Should I just not select the 'cascade...
Good point. I know it will defy normalization rules, but I'm gonna put a field in the problems table for ComputerID and a field for UserID. We can fill those/remove as necessary in the process.
An additional thought is to put another field in the problems table to define what type of...
Thank you both for your inputs on this matter. I think I need to elaborate a bit more...
This application is aimed at the IT team tracking computer and user problems. Initially, the IT staff will enter reported problems into the db...later, I may add self-reporting ability.
Each user will...