it_inventar_datenbank
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| it_inventar_datenbank [2026/01/22 14:43] – kalaschnikow | it_inventar_datenbank [2026/03/04 09:13] (current) – kalaschnikow | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== IT Inventar Datenbank ====== | ||
| + | [[DJHN]] | ||
| + | |||
| + | ===== ToDo ===== | ||
| + | |||
| + | * For_InventarArbeitsmittel | ||
| + | * **-** make fields wider | ||
| + | |||
| + | ===== Misc ===== | ||
| + | |||
| + | |||
| + | Bericht " | ||
| + | |||
| + | Um Inventarnummer aus dem Formular zu übergeben: | ||
| + | |||
| + | <code sql> | ||
| + | SELECT Inventar.Inventarnummer, | ||
| + | Inventar.Modell, | ||
| + | Inventar.Kostenstelle, | ||
| + | Inventar.Standort, | ||
| + | [Zustand] AS Ausdr1, [weiteres Zubehör] AS Ausdr2 | ||
| + | FROM Standort | ||
| + | INNER JOIN (Kostenstellen INNER JOIN Inventar ON Kostenstellen.KSt = Inventar.Kostenstelle) | ||
| + | ON Standort.Standort = Inventar.Standort | ||
| + | WHERE (((Inventar.Inventarnummer)=Forms!For_InventarArbeitsmittel!Inventarnummer)); | ||
| + | </ | ||
| + | |||
| + | |||
| + | Checken, ob ein Ordner existiert: | ||
| + | |||
| + | <code > | ||
| + | Private Sub Befehl274_Click() | ||
| + | Dim Inventarnummer As String | ||
| + | Dim foldername As String | ||
| + | |||
| + | foldername = " | ||
| + | |||
| + | Dim oFSO As Object | ||
| + | Set oFSO = CreateObject(" | ||
| + | | ||
| + | If oFSO.FolderExists(foldername) = True Then | ||
| + | |||
| + | ' MsgBox " | ||
| + | |||
| + | |||
| + | Else | ||
| + | |||
| + | 'File doesn' | ||
| + | ' MsgBox " | ||
| + | |||
| + | MkDir foldername | ||
| + | |||
| + | End If | ||
| + | |||
| + | FollowHyperlink foldername | ||
| + | |||
| + | End Sub | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | Ausgabe von einem Bericht in eine Datei: | ||
| + | |||
| + | <code vba> | ||
| + | Private Sub Befehl275_Click() | ||
| + | Dim strReport As String | ||
| + | Dim strWhere As String | ||
| + | Dim strFileName As String | ||
| + | Dim strFolder As String | ||
| + | Dim intChoice As Integer | ||
| + | Dim strPath As String | ||
| + | | ||
| + | strReport = " | ||
| + | ' | ||
| + | strFileName = Format(Date, | ||
| + | | ||
| + | ' | ||
| + | | ||
| + | ' | ||
| + | Application.FileDialog(msoFileDialogSaveAs).InitialFileName = strFileName | ||
| + | 'make the file dialog visible to the user | ||
| + | intChoice = Application.FileDialog(msoFileDialogSaveAs).Show | ||
| + | | ||
| + | ' | ||
| + | If intChoice <> 0 Then | ||
| + | 'get the file path selected by the user | ||
| + | strPath = _ | ||
| + | Application.FileDialog(msoFileDialogSaveAs).SelectedItems(1) | ||
| + | ' | ||
| + | 'Call MsgBox(strPath, | ||
| + | | ||
| + | Else | ||
| + | DoCmd.Close acReport, strReport | ||
| + | Exit Sub | ||
| + | End If | ||
| + | | ||
| + | DoCmd.OutputTo acOutputReport, | ||
| + | | ||
| + | ' | ||
| + | End Sub | ||
| + | </ | ||
