Advertisement
Advertisement
| 05.09.2008 at 02:40PM PDT, ID: 23390896 | Points: 125 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: |
Private Sub Form_Open(Cancel As Integer)
Dim strUser As String
Dim strSQL As String
Dim MonthFile As String, strDate As String, intMonth As Integer
Dim MonthVal(6) As Integer, y As Integer
Dim MonthString(6) As String
Dim qd As QueryDef, db As Database
Dim rs As ADODB.Recordset
Dim sqlDel As String
frmSubform.Form.RecordSource = ""
sqlDel = "DROP TABLE tblProjectionsTemp"
DoCmd.RunSQL sqlDel
Set db = CurrentDb
Set qd = db.QueryDefs("qryProjections")
MonthFile = "H:\Database\Monthstart.txt"
Open MonthFile For Input As #1
Input #1, strDate
Close #1
intMonth = Month(DateValue(strDate) - 10)
For y = 0 To 6 Step 1
MonthVal(y) = intMonth + y
MonthString(y) = Left(MonthName(MonthVal(y)), 3)
Next y
strUser = Environ("Username")
Me.Caption = strUser & ": Six Month Projections"
qd.Sql = "SELECT tblProjections.[Job Number], tblFullJoblist.[Job Name], tblProjections.[Last Month] AS " & MonthString(0) & ", tblProjections.[Current Month] AS " & MonthString(1) & ", tblProjections.Month2 AS " & MonthString(2) & ", tblProjections.Month3 AS " & MonthString(3) & ", tblProjections.Month4 AS " & MonthString(4) & ", tblProjections.Month5 AS " & MonthString(5) & ", tblProjections.Month6 AS " & MonthString(6) & ", tblProjections.employee INTO tblProjectionsTemp " _
& "FROM tblProjections INNER JOIN tblFullJoblist ON tblProjections.[Job Number] = tblFullJoblist.[Job Number] " _
& "WHERE (((tblProjections.employee)='" & strUser & "'));"
qd.Execute
frmSubform.SourceObject = "Table.tblProjectionsTemp"
frmSubform.Locked = False
With frmSubform.Form
.AllowAdditions = False
.AllowDeletions = True
![Job Name].Locked = True
![Job Name].ColumnWidth = 3.248 * 1440
![Job Number].Locked = True
End With
End Sub
|
| Microsoft |
| Apple |
| Internet |
| Gamers |
| Digital Living |
| Virus & Spyware |
| Hardware |
| Software |
| ITPro |
| Developer |
| Storage |
| OS |
| Database |
| Security |
| Programming |
| Web Development |
| Networking |
| Other |
| Community Support |
| 05.09.2008 at 03:41PM PDT, ID: 21536839 |
| 05.09.2008 at 04:02PM PDT, ID: 21536924 |
| 05.09.2008 at 04:06PM PDT, ID: 21536940 |
| 05.09.2008 at 04:31PM PDT, ID: 21537084 |
| 05.09.2008 at 04:54PM PDT, ID: 21537237 |
1: 2: 3: |
qd.Sql = "SELECT tblProjections.[Job Number], tblFullJoblist.[Job Name], tblProjections.[Last Month] AS [" & MonthString(0) & "], tblProjections.[Current Month] AS [" & MonthString(1) & "], tblProjections.Month2 AS [" & MonthString(2) & "], tblProjections.Month3 AS [" & MonthString(3) & "], tblProjections.Month4 AS [" & MonthString(4) & "], tblProjections.Month5 AS [" & MonthString(5) & "], tblProjections.Month6 AS [" & MonthString(6) & "], tblProjections.employee INTO tblProjectionsTemp " _
& "FROM tblProjections INNER JOIN tblFullJoblist ON tblProjections.[Job Number] = tblFullJoblist.[Job Number] " _
& "WHERE (((tblProjections.employee)='" & strUser & "'));"
|
| 05.09.2008 at 05:24PM PDT, ID: 21537325 |
| 05.09.2008 at 05:25PM PDT, ID: 21537329 |
| 05.12.2008 at 07:34AM PDT, ID: 21547324 |
| 05.12.2008 at 08:01AM PDT, ID: 21547546 |
| 05.12.2008 at 09:10AM PDT, ID: 21548171 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: |
On Error Resume Next
![Jan].ColumnWidth = 0.645 * 1440
![Feb].ColumnWidth = 0.645 * 1440
![Mar].ColumnWidth = 0.645 * 1440
![Apr].ColumnWidth = 0.645 * 1440
![May].ColumnWidth = 0.645 * 1440
![Jun].ColumnWidth = 0.645 * 1440
![Jul].ColumnWidth = 0.645 * 1440
![Aug].ColumnWidth = 0.645 * 1440
![Sep].ColumnWidth = 0.645 * 1440
![Oct].ColumnWidth = 0.645 * 1440
![Nov].ColumnWidth = 0.645 * 1440
![Dec].ColumnWidth = 0.645 * 1440
On Error GoTo 0
|
| 05.12.2008 at 09:12AM PDT, ID: 21548191 |
| 05.12.2008 at 10:08AM PDT, ID: 21548696 |
| 05.12.2008 at 02:08PM PDT, ID: 21550535 |