Forum Widgets
Latest Discussions
Strange chraracters in the powershell command PS_GetOutputFile("netsh wlan show interfaces")
I´m creating a sub that lay out in a textbox of a form with strange chrs. my sub is as follow: Private Sub Form_Load() 'Redondear las esquinas del formulario Call UISetRoundRect(Me, 40, False) 'This sets an exact position using MoveSize if form´s parent is loaded, otherwiseccenter de form on screen If IsLoaded("frmDashBoard") Then DoCmd.MoveSize 15050, 2400 Else Call gfncCenterForm(Me) With Me 'Encabezado de la información de la red Wi-Fi If Not IsNull(Me.OpenArgs) Then Me!lblInfo.Caption = "INFORMACIÓN " & Me.OpenArgs 'Cargar la información de la red Wi-Fi !txtInfo.Value = PS_GetOutputFile("netsh wlan show interfaces") '!lblTitle.Caption = PS_GetOutputClipBoard("(Get-NetConnectionProfile).Name") End With End Sub Public Function PS_GetOutputFile(ByVal sPSCmd As String, _ Optional sTxtFile As String = vbNullString, _ Optional bDelTxtFile As Boolean = True) As String 'If no Text file was specified create one in the Temp folder If sTxtFile = vbNullString Then sTxtFile = Environ$("temp") & "\PSTemp.txt" 'Build the basic PowerShell command sPSCmd = "powershell -command " & sPSCmd 'Add the Out-File so the output generates a text file sPSCmd = sPSCmd & " | Out-File '" & sTxtFile & "' -Encoding Default" 'Run the PowerShell command CreateObject("WScript.Shell").Run sPSCmd, 0, True 'Retrieve the content of the generated Text file With CreateObject("Scripting.FileSystemObject") 'Read the contents of the text file into memory PS_GetOutputFile = .OpenTextFile(sTxtFile).ReadAll() 'Delete the text file if so desired If bDelTxtFile = True Then .DeleteFile sTxtFile End With End Function Public Function PS_GetOutputClipBoard(ByVal sPSCmd As String) As String 'Setup the powershell command properly sPSCmd = "powershell -command " & sPSCmd & "|clip" 'Execute the command which is being pushed to the clipboard CreateObject("WScript.Shell").Run sPSCmd, 0, True 'Get an instance of the clipboard to capture the save value With CreateObject("New:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}") .GetFromClipboard PS_GetOutputClipBoard = .GetText(1) End With End Function the result was: Hay 1 interfaz en el sistema: Nombre : Wi-Fi Descripci+¦n : Realtek 8822CE Wireless LAN 802.11ac PCI-E NIC GUID : Direcci+¦n : Tipo de interfaz : Principal Estado : conectado SSID : Redmi Note 12 Pro 5G AP BSSID Banda : 2,4-áGHz Canal: 6 Tipo de red : Infraestructura Tipo de radio : 802.11n Autenticaci+¦n : WPA2-Personal Cifrado : CCMP Modo de conexi+¦n : Conexi+¦n autom+ítica Velocidad de recepci+¦n (Mbps) : 144.4 Velocidad de transmisi+¦n (Mbps) : 144.4 Se+¦al : 100% Perfil : Redmi Note 12 Pro 5G MSCS de QoS configurado: 0 Asignaci+¦n de QoS configurada: 0 Asignaci+¦n de QoS permitida por la directiva : 0 Estado de la red hospedada: No disponible this character +¦ it suposed to be a vocal with acent ´cause is in spanish language, also could be ñáéíóú Could someone help me please!! Thanks in advance.ixxo09Nov 21, 2024Occasional Reader38Views0likes2CommentsBar Code label problems
Office 365. I have labels (reports) with fields that are printed in a bar code font (Code 128 or 3 of 9). After automatic updates, these bar codes do not print properly. Is this a known problem? If not, what is causing these repeated problems? Thanks in advance,Maxine14062Nov 18, 2024Brass Contributor62Views0likes7CommentsDsum
Hello experts, I need to make a running sum total on tblDrawsDetails.Amount but noting the where clause. Please see attached accdb and xls file. I have the following but it just returns the grand total of Amount but I need it to sum where the ID< ID RunningSum: (DSum("Amount","tblDrawsDetails","FacIDfk=" & [FacIDfk] And [ID]<=[ID])) SELECT tblDrawsDetails.ID, tblDrawsDetails.FacIDfk, tblDrawsDetails.Amount, tblDrawsDetails.DateRecd, (DSum("Amount","tblDrawsDetails","FacIDfk=" & [FacIDfk] And [ID]<=[ID])) AS RunningSum, Year([DateRecd])*12+DatePart('m',[DateRecd])-1 AS MonthYrSort, First(Format([Daterecd],"yyyy"", ""mmmm")) AS FundingDateGrp FROM tblDrawsDetails GROUP BY tblDrawsDetails.ID, tblDrawsDetails.FacIDfk, tblDrawsDetails.Amount, tblDrawsDetails.DateRecd, Year([DateRecd])*12+DatePart('m',[DateRecd])-1 ORDER BY Year([DateRecd])*12+DatePart('m',[DateRecd])-1;SolvedTony2021Nov 15, 2024Steel Contributor54Views0likes8CommentsCopilot, Access, and VBA
I don't know how many of you use Copilot to assist you with Access. I developed my own application using Copilot and it was extremely helpful. I recommend you give it a try to see if it can help you. Here is an article I wrote on it in case you're interested: https://medium.com/@jmsp4home/did-my-own-spending-income-tracking-software-using-microsoft-copilot-heres-why-and-how-it-went-1aa8b4814cca?source=friends_link&sk=64ebb3ecf7e5b19c05d1731a571b1001JM4SPNov 12, 2024Copper Contributor110Views0likes7CommentsSharepoint Linked Table - Help
Hi, I have an older sharepoint list that collects concrete deliveries to site (Insitu Concrete), i have a new Sharepoint list that that shows the price for each mix type (Concrete_Mix_Design_Costs). I cannot run a query or use DLookup succesfully to add the price to each delivery. Above are the tables i want to put the price against each delivery based on Mix Type. Any help would be much appreciated, I am a builder not a computer person but have muddled my way to building a database that runs our procurement etc, but despite hours of effort i am going nowhere with this. ThanksSolvedHenryDNov 12, 2024Copper Contributor58Views0likes4CommentsDlookup - 3 criteria
Hello Experts, I am trying to use Dlookup with 3 criteria. The attached excel file is clearer but I will try to explain. What I need to return is the qryFacilityBal.[Balance] where "ProjIDfk=" & [tblDraws].[ProjID] & " And [IDFacfk] =" & [tblFacility].[ID] and [DateAmend] < " & [tblDraws].[FundingDate]. The 3rd criteria is what I am having problems with. I don’t think it’s a simple < criteria since it seems more like a BETWEEN statement. Maybe an expert knows exactly what I am trying to do. here is the criteria: If the [FundingDate] is < [qryFacilityBal].[DateAmend] then use the MIN [qryFacility].[Balance]. If the [FundingDate] is <= MAX [qryFacilityBal].[DateAmend] then use the MAX [qryFacility].[Balance]. If its BETWEEN I am not sure how that would be coded. Here is my dlookup clause (red part is the issue): FacAmtDlook: Format(DLookUp("Balance","qryFacilityBal","ProjIDfk=" & [tblDraws].[ProjID] & " And [IDFacfk] =" & [tblFacility].[ID] & " And nz([DateAmend],0) < " & Format$(Nz([tblDraws].[FundingDate],0),"\#mm\/dd\/yyyy\#")),"Standard") Please see attached xl file. The example is clearer but I have a screen shot below. grateful for the help. I hope its clear. The excel file I think is easier to follow. Let me know if not clear.SolvedTony2021Nov 11, 2024Steel Contributor119Views0likes16CommentsError message 'Microsoft Access can't open the form 'Temp.''
I work with an Access database designed 30 years ago with which I've had no problems with until today. Suddently, when I try to run some functions (crosstab query or design a query) I'm getting this error message: "Microsoft Access can’t open the form ’temp.’ It contains data that Microsoft Access doesn’t recognize. Re-create the form or, if you maintain backup copies of your database, retrieve a copy of the form.’" Sometimes the query has time to run before the message appears but once it does, the application freezes. Click OK or close the box or press Escape, the result is the same: Access closes. The form 'temp' isn't one I've created and doesn't appear on the preview pane. I can highlight it using 'analyze performance' under 'database tools' but then I get an error message 'Application-defined or object-defined error' and again the application closes. Exactly the same messages appear when I try to run archived versions of the database which I'd not opened or altered for months - so I think it's an interface issue between the design of my database and a freshly updated version of Access? I've tried the obvious (compact and repair, safe mode, re-downloading Office 365) but nothing changes this. I have tried creating a new very simple database and can run cross-tab queries in that OK.owenjohnsontreesNov 11, 2024Copper Contributor346Views0likes12CommentsMS Access Handling Nulls In Query Formula
Hi all, I have this formula in Access: IIf([Init_Static_P] < 0 And (Nz([Adj_Static_P], -9999) < 0), "Resolved", "Not resolved" which keeps outputting an #Error when Adj_Static_P is null which will happen. I need the nulls in my dataset. Whenever Init_Static_P is < 0 and or Adj_Static_P is < 0, it works as it should outputting "Resolved" and vicer versa, however it does not work whenever there is any instance of Adj_Static_P as a blank value. Does anyone know how I can handle the nulls so that if the Init_Static_P is >0 and Adj_Static_P is null, then it would output "Unresolved", and if Init_Static_P is <0 and Adj_Static_P is null then it would output "Resolved" instead of #Error? Output should be as follows: Init_Static_P Adj_Static_P Result >0 Null "Not resolved" >0 >0 "Not resolved" <0 Null "Resolved" <0 < 0 "Resolved" Thanks in advance! <3jazzyelsieNov 08, 2024Copper Contributor72Views0likes3CommentsIsMissing not working since last update
I use a few optional parameters here and there, and check to see if they have a value with the IsMissing function. As of the last update (around 11/5/24) it's no longer working. I can check to see if there is a value, and in the case of a string I can check for an empty string, but I would like not to have to recode my database. Anyone else have this issue, or is it just me? Solutions?Bjones9942Nov 08, 2024Copper Contributor41Views0likes4Comments
Resources
Tags
- access1,599 Topics
- office 365352 Topics
- 2016192 Topics
- developer181 Topics
- Access Web Database96 Topics
- Access Web App56 Topics
- 201351 Topics
- SharePoint49 Topics
- 201042 Topics
- admin40 Topics