This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Public Function fieldexists(tablename As String, fieldname As String) As Boolean | |
| Dim exists As Boolean | |
| exists = False | |
| On Error Resume Next | |
| exists = CurrentDb.TableDefs(tablename).Fields(fieldname).name = fieldname | |
| fieldexists = exists | |
| End Function |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Public strFileName As String '' Set strFileName as a public variable | |
| Private Sub DDBox_AfterUpdate() | |
| '' The code below will set the strFileName variable equal to the file path of the file that is dragged onto it. | |
| Dim fso As New FileSystemObject '' Microsoft Scripting Runtime required | |
| strFileName = fso.GetParentFolderName(Me.DDBox.Hyperlink.address) | |
| Me.DDBox = Null | |
| If strFileName = "" Then Exit Sub | |
| '' Execute the DDBoxRoutine defined below | |
| DDBoxRoutine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DECLARE @StringForColors AS VARCHAR(80), | |
| @Result AS VARCHAR(80); | |
| SET @StringForColors = 'Red,Green,Blue,Black,Yellow,Brown,Purple,Pink,Silver,Gold,Burgundy'; | |
| SET @Result = REPLACE(@StringForColors, ',', CHAR(10) + CHAR(13)); | |
| SELECT @Result AS 'See Colors with a Line Feed as well'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DECLARE @StringForColors AS VARCHAR(80), | |
| @Result AS VARCHAR(80); | |
| SET @StringForColors = 'Red,Green,Blue,Black,Yellow,Brown,Purple,Pink,Silver,Gold,Burgundy'; | |
| SET @Result = REPLACE(@StringForColors, ',', CHAR(10)); | |
| SELECT @Result AS 'See Colors with a Line break'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function ExportToExcelAllowed(ActivityDateFrom, ActivityDateTo, ActivityUserSelection) | |
| { | |
| var ButtonColor = '#808080' ; | |
| var RetVal = false ; | |
| if ((ActivityDateFrom != '') || (ActivityDateTo != '') || (ActivityUserSelection != '')) | |
| { | |
| ButtonColor = 'Blue' | |
| var RetVal = true ; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <font color="#808080"><strong>Export </strong></font> <img src="images/disabled/$$application.ms.excel.png.a5image" id="{dialog.ComponentName}.V.R1.BUTTON_EXPORT_TO_EXECL.ICON" class="" style="vertical-align: middle; border: none;"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <font color="blue"><strong>Export</strong></font><img src="images/$$application.ms.excel.png.a5image" id="DLG1.V.R1.BUTTON_EXPORT_TO_EXECL.ICON" class="" style="vertical-align: middle; border: none;">" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE PROCEDURE GetOrders | |
| @OrderID INT | |
| AS | |
| BEGIN | |
| DECLARE @Local_OrderID AS INT | |
| SET @Local_OrderID = @OrderID; | |
| SELECT | |
| OrderID, | |
| CustomerID, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TRUNCATE TABLE INV | |
| INSERT INTO INV WITH(tablock) | |
| SELECT | |
| [Inv_NewPK], | |
| [PartNumber], | |
| [PurchasePrice], | |
| [SupplierPN], | |
| [SupplierCode], | |
| [SupplierName], | |
| [PartDesc], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SET ANSI_NULLS ON | |
| GO | |
| SET QUOTED_IDENTIFIER ON | |
| GO | |
| ALTER trigger [dbo].[my_tr] on [dbo].[Stock] | |
| FOR INSERT, DELETE,UPDATE | |
| AS | |
| IF EXISTS (SELECT * FROM INSERTED) AND EXISTS (SELECT * FROM DELETED) | |
| INSERT INTO St_trigger (DT,Operation) SELECT GETDATE(),'Update' |
NewerOlder