Modules & VBA :: Send Command To Device Connected Via RS-232 Serial Port

Feb 10, 2014

Using Access 2010

How do I send the command "^G" to a device connected via serial port (RS-232) number 3?

View Replies


ADVERTISEMENT

Modules & VBA :: Send Commands To External Device Using A Serial Port

Dec 10, 2013

I need to send commands to an external device using a serial port.My understanding is that that I need to select the reference to the Microsoft Communications Control (MScomm32.ocx).But is not available in the list of references!

View 2 Replies View Related

Read Comm Port (Serial Port)

Apr 9, 2007

I have soem code that is looking at the Comm port on my laptop....I had this code working great about 9 months ago. I dont know what has changed besides me moving to another laptop.

I dont know if I am missing a reference to a llibrary or what. I think I am....

Right now I am bombing out on the First Line....

DOES ANYONE HAVE ANY IDEAS HERE....


ERROR:
Run time error 424
Object Required

CODE:

MSComm7.InBufferCount = 0 'Flush the Buffer

If (Not MSComm7.PortOpen) Then

Dim Instring As String ' Buffer to hold input string
MSComm7.CommPort = 1 ' Use COM1.
MSComm7.Settings = "9600,N,8,1" ' 9600 baud, no parity, 8 data, and 1 stop bit.
MSComm7.InputLen = 0 ' Tell the control to read entire buffer when Input is used.
MSComm7.PortOpen = True ' Open the port.
MSComm7.Output = "AT" & vbCr ' Send the attention command to the modem. Ensure that the modem responds with "OK".
Buffer$ = Buffer$ & MSComm7.Input ' Wait for data to come back to the serial port.
'MsgBox "SMS Port Open", vbOKOnly, "Port State"
Else
'MsgBox "SMS Port Already Open, It is now closing, and will re-open", vbOKOnly, "Port State"
MSComm7.PortOpen = False
'MSComm7.PortOpen = True
Call Command8_Click
End If

View 4 Replies View Related

Modules & VBA :: Trying To Convert Send Key Command To Something Newer

Jul 12, 2015

We have a ton of Access 97 DBs I've been asked to "fix". Since moving to Windows 7 some of them have been giving Error70 comands, which I've narrowed down to Sendkey not playing nicely with Windows 7. Anyway, I was able to fix it for one user by turning UAC off. Not my preferred way to operate, but it's a stopgap until I can get this mess sorted out.

Ok, here's the code. This is an event procedure that is tied to a date field where staff are to enter a date in MM/DD/YYYY format. For some reason there is no tab order anywhere on this DB so they have to click to enter. In the past they had to make sure that they clicked at the left most M in MM to make the entry.

It appears that this Sendkey is the culprit here. Is there anyway I can safely remove that w/o breaking something? I cannot get sole access to this DB as it's in use pretty much 24/7 until the 11pm backup for the server it resides on. It is Access 97. I was thinking of just pulling the macro from that field but then again I am not an Access person by any means,

Option Compare Database
Option Explicit

Private Sub cboxptno_GotFocus()
cboxptno.Dropdown
End Sub
----
Private Sub Command111_Click()
On Error GoTo Err_Command111_Click

[code]....

View 10 Replies View Related

Modules & VBA :: Device Table - Warning Message Based On Combobox Selection

Jul 26, 2013

I have a combobox with several options for a device's parts. When one part is selected, it gets added to a device table.

ComponentCmb
Generator A
Generator B
Gearbox A
Gearbox B
Blades A
Blades B
Blades C
Tower A
Tower B

I want to display an error message if an option is being selected more than once.

For example, if a gearbox has been chosen, then another gearbox cant be chosen too.

How do i display this warning message.

View 3 Replies View Related

Modules & VBA :: Turn On / Off The Light Attached To Usb Port Through It?

Jun 2, 2015

Is it possible enable and disable a usb port via vba?

An example of using this would be if I had a light plugged in a usb port and the code would turn it on and off.

Or maybe is there s some device like <PC-Some Device-USB light > which can be controled by vba

View 3 Replies View Related

Modules & VBA :: Users Connected To Split Database

Sep 30, 2013

I have an project with a split database. The data is stored in the database_be.accdb

I want to know which users are connected tot this database.

View 4 Replies View Related

Create Command Button On Form To Send Email

Oct 26, 2004

I have created a form and housed in the form is a combo box that pulls info from managers I work with. I want to create a command button that I can click to send them an email. I have their information tabled and then have also converted that table into a form. I have their email address I just need to know how to properly code the command. I have no visual basic experience. I have had classes where I've coded in C++ and HTML but very limited.

Thanks

View 6 Replies View Related

Modules & VBA :: Auto Serial Numbering For Each Quotation

Apr 8, 2014

I am using an access program with a form with detail section. I would like to create auto sr.No when i am creating a new quotation. Using Autonumber didn't work because it start numbering from last quotation.

Snap shot is also attached.

View 3 Replies View Related

Modules & VBA :: Count Of Serial Number In Email Body

Jul 15, 2013

I am attempting to modify some code that is used for reading content in an Outlook mail and need to catch and move the email if certain content is duplicated in the email.

The code reads the email that is in the attached image format:

As seen, this email contains 2 devices, but the Serial No in both is duplicated.

In the code, I need to capture this and rather than reading the contents, I need to just move this email to a separate "Manual" folder to be dealt with separately, so not to write the information to the database.

The current code is as follows:

Option Explicit
Private ns As Outlook.Namespace
Private sEmailAddress As String
Private sPerson As String
Private dReceived As Date

[Code] .....

View 4 Replies View Related

Modules & VBA :: Object Read Only And Type Mismatch Error For Serial Number

Jun 15, 2015

I'm having an issue with the database being read only and a type mismatch due to OpenRecordset. I know this database use to work when it when it was just

CurrentSerNum = RecSet(0) +1 was doing the incrementing.

I need the database to increment in a different way now.

Q=manufacture location
1st number is new=0 or used=1
2nd and third number =82
4th is single digit year aka 2015 = 5
6 and 7th are work week aka 25 for this week
8,9,10 are incremental numbers for the units made that workweek, so 001,002,003.
Then week 26 starts the increment starts back at 001.

Code:
Private Sub MakeThoseProducts_Click()
On Error GoTo Err_MakeThoseProducts_Click
Dim NumericSerial As Double
Dim WorkWeek As String
Dim WorkYear As String
Dim WorkWeekNumber As Integer
Dim WorkYearNumber As Integer
Dim Location As String

[Code] ....

View 14 Replies View Related

General :: How To Open Access Database On Android Device

Jan 18, 2015

I want edit my Access Database on my Android phone, is there any good App recommend ?

View 2 Replies View Related

Port Database

Mar 3, 2005

Hello,

I have a lotus datbase at work and there are far to many conflicts with XP. I am trying to make an access database but keep getting as far as the calculations and then give up.

I have a ships data base. I am trying to calculate totals for each vessels cargo.
Some vessels have more than one cargo. eg A Shell Oils vessel may have Diesel, Unleaded or Leaded Fuel on the one trip.

I have been able to get these totals to work b4 but I forget how I did it. If I calculate Cargo1+Cargo2 + Cargo 3 I get 100200300

The other problem that I have is that the totals do not appear in the corresponding table and so I am not able to use totals in query or report.

eg Form Cargo Cargo Tonnage 100
Cargo 1 Cargo Tonnage 1 200
Cargo 2 Cargo Tonnage 2 300
Cargo Total 100200300 :mad:
Am I going about this form in the correct way or am I totally going against the grain of access?

Any help would be appreciated.

Thanks

Mr Wheeze

View 4 Replies View Related

Who Is Connected

May 2, 2006

hey gus....How can i know Who is connected to the db?
thx, Max.

View 6 Replies View Related

Accessing NMEA Strign From Com Port

Aug 11, 2005

I have a few questions which I hope you all can help point me in the right direction.

A little background is in order. What I am trying to accomplish is Read the NMEA string passed to the Com Port 1 of a laptop from a Trimble GPS Unit. Once I have the string I need to parse it ang place the Lat Long in a couple fields in my Access Database. First off I have to capture the string from the Com Port.

Does anyone have any suggestions of where I can start to learn the code needed to read the Com Port 1 to retrieve the NMEA String pushed from the GPS Unit?

How can I do this from within an Access Database?

If I can get the string returned to a variable that would be great. From what I heard other people were writing this to a file?

Any help would be appreciated.

Thanks,

Jay

View 1 Replies View Related

How Many Users Connected To Db

Jun 20, 2007

How can we know that , how many active connections or users are using database at some specific time..

View 11 Replies View Related

General :: How Many Connected Users In Database

Dec 4, 2014

I made an access 2013 application. I want to sell licences per users. How can I know how many users are connected in the database ?

Is there an easy way to know that?

View 5 Replies View Related

Search Key Not Found In Any Record Error (Trying To Port Database File)

Jul 24, 2015

My database is in database where we do the editing and using Access for query reports.

Upon importing from External Data Link to the data source by creating a linked table: the table was created but running a query yields the above error.

View 1 Replies View Related

Open Blank Form When Connected To Table?

Mar 21, 2005

I have a form that is connected to a table - when I open the form it loads the first record in the table. How can I make it open a blank form, ready to add a new record?

View 1 Replies View Related

Tables :: Connected Views Deliver Incorrect Data

Mar 26, 2014

Front end access 2010, back end SQl-server 2008 R2.I have all talbes and views connected to the server and due to incorrect results I found out, that the views from the server deliver incorrect data.Of course I refreshed the views in the access front end I even deleted them and connected them for new, but the incorrect data, even a different field sequence (!) remain.in a certain field there can be two different values: 1 and 2.

If opening the view I can only see 1, on the server the view shows 1 and 2, in the records, whatever is the value.This is not a calulated field.When checking this in a query in access I can select on value 2 (although I cannot see it!!) and I get the correct records but in the field itself the values still show as 1 !!

Same with other values in other fields. When I take the same SQL from the view in a stored procedure and execute is from access I get the correct data!!On both, view and sp I have the same permissions on the server!why views show incorrect data?

View 2 Replies View Related

Modules & VBA :: Send Email When DB First Opened

Feb 11, 2014

I have the code for sending an email but I only want to send a single email when there are records in a query and only when the database is first opened.

I hadn't considered this in my design so what structural requirements would it require if any?

View 5 Replies View Related

Modules & VBA :: How To Send Different Attachments To Different Recipients

Jul 22, 2015

I currently have a code set up which sends an attachment from a drive on my computer to all the email addresses in a certain query. I would like to change the code so that I can add a button that will allow me to send an email with a specific attachment depending on their individual code in a table, e.g each person will receive a specific attachment. At the moment, the attachments are saved with the same file name as the person's specific code.The code I am currently using is:

Private Sub Command9_Click()
Dim MyDb As DAO.Database
Dim rsEmail As DAO.Recordset
Dim qdf As DAO.QueryDef
Dim prm As DAO.Parameter
Dim strEmail As String
Dim strMsg As String
Dim oLook As Object

[code].....

View 9 Replies View Related

Modules & VBA :: Send Text As Hyperlink

Jul 26, 2014

Since my old DB had hyperlink (web pages) either starting with http:// or not, and the users were complaining that they couldn't easily edit the field, I converted all the fields to text. Then I tried the following code on doubleclick:

Dim WebLink As String
If Me.WebPage2 <> "http//" & "*" Then
WebLink = "Http://" & Me.WebPage2
Else
WebLink = Me.WebPage2
End If
Debug.Print WebLink
Application.FollowHyperlink WebLink, , True

The above works fine if there is no http:// but if there is one already in the text, then I get run time error 5 that it cannot locate the page. On checking what is happening, the code is adding http:// again even if it already there.

View 7 Replies View Related

Modules & VBA :: Send Report Through Gmail

Nov 17, 2013

I use this to send email msgs through gmail, found it on the net somewhere, adapted a bit and it works.

Code:
Private Function fSendGmail() As Boolean 'Returns True if No Errors are Generated
On Error GoTo Err_ErrorHandler
fSendGmail = True
Const conStrPrefix As String = "http://schemas.microsoft.com/cdo/configuration/"
Const conCdoSendUsingPort As Integer = 2

[Code] ....

Err_ErrorHandler:
If Err.Number <> 0 Then fSendGmail = False etc, etc
End Function 'fSendGmail

I'd like to send report attached to this as pdf or rtf. How should I go about it. I know how to create pdf and save it.(DoCmd.OutputTo acOutputReport, "My Report", acFormatPDF, strPath, True) But where do I attach that here? Is it necessary to save the file first?

View 6 Replies View Related

Modules & VBA :: Send Report With Variable Name

Jan 8, 2015

I use a macro that attaches a document automatically to an e-mail address ready to send this report is governed by a query of which the criteria is " loss order number " this is in a pdf format of which I need if possible

The problem I have is the same pdf file keeps attaching itself to the e-mail no matter which loss order number I select. The reason I think is because the report is called NCR so it is not changing from the previous one. What I think can solve it but not sure and don't know how to do is get the " loss order number " within the report name.

If I just send the report to a file direct it does work as I am prompted for a file name

Can the loss order number get into the file name within a macro/vba

Code:
Name="EMailDatabaseObject
Name="ObjectType">Report
Name="ObjectName">SEND NCR
Name="OutputFormat">PDF Format (*.pdf
Name="To">=[E-mail Address] & IIf(Nz([E-mail Address

View 2 Replies View Related

Modules & VBA :: Send OpenArgs As Array?

Apr 28, 2015

Is it possible to send several form's OpnArg as Array ? Now I'm using a long text string including || as divider so I can split them later into Array.

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved