Modules & VBA :: Send / Receive Small Text Strings Over A Network

Jul 20, 2015

Small piece of code that can send / recieve small text-strings over a network. I finally got it to work, but forgot to think ahead . Right now it only works in a formular but i really need to be a function with input / output.

My problem is that i am using the "Withevents" to call the Ostrosoft Winsock network module and "Withevents" does not work in functions.

How to build this into a function ?

Code:
Option Compare Database
Option Explicit
Dim sBuffer As String
Dim spage As String
Dim WithEvents wsTCP As OSWINSCK.Winsock

[Code] ....

View Replies


ADVERTISEMENT

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 :: Receive Email When A Row Added To Specific Table?

Oct 8, 2013

Is it possible to receive an email when a row added to a specific table?

View 3 Replies View Related

Importing Text Strings

Jan 14, 2008

hi guys,

i am importing a tab seperated file into a table, and one of the fields is a user comment.

all is well -- until a record is imported that contains comment with a carriage return followed by some more text. the text after the carriage return is imported as the next record.

if the file is tab seperated, why is the carriage return causing the import to act in this way?

thanks

rik.

View 6 Replies View Related

Parsing Text Strings

Feb 15, 2008

I'm trying to parse text strings by certain spaces and characters within the string. For Example, if my text string is RAST 2006-A1 B1 mtge, how can I 1) create a new field with just the RAST 2006-A1, 2) Create a field with just the RAST 2006-A1 B1?

I appreciate any help I can get. Thanks!

View 6 Replies View Related

Modify Default Values And Text Strings

Apr 4, 2006

Hello, I have two newbie questions. First, when I design a checkbox in Form design view, how do I program or script the form so it will enter a "1" value on the corresponding tables database per column. (Just like in the option group design, where a click on each option generates a specific value on the tables database).

Second, how can I design the form where it can accept text strings as input and displays them 'as is' in the corresponding tables database as a text string.

Thanks for looking. :)

View 1 Replies View Related

Queries :: Parsing Strings Of Text Between XML Tag Identifiers

Oct 12, 2014

I have a Db with a table imported from sql server. One of the fields contains data wrapped between xml tags. The xml tag identifiers when looked at as columns are not consistently the same tag identifiers but effectively I am parsing the string to provide columns of data from between the tag identifiers.

example:

<T6><A29>Compton Group</A29><A31>CO009</A31><A32>CO161/71</A32><A30>Invu Proposal</A30><A28>05 September 2007</A28><A41>Sales</A41></T6>

I am wondering if the method I am using to deconcatenate the string is the bext way. In my query I reference the left tag value .

TagVal1: ParseTagOpenVal([Attributes],3)

And then I parse the result based on the right hand tag value

Val1: ParseTagCloseVal([TagVal1],1)

I have a couple of modules for parsing the string and I am able to deconcatenate using this method but I am wondering if its the only way or the most efficient?

View 1 Replies View Related

Exporting Query To Text File - Too Small To Accept The Amount Of Data ... HELP!! WHY?

Mar 30, 2006

Hi folks,
I have a query that returns about 3500 records (and runs very well I have to say). the issue comes when I attempt to export that queries results to a comma seperated text file. It gives me the message that the field is too small to accept the amount of data..bla bla bla... I've looked this up and it mentions stuff about memo fields and issues with that, but I don't have any memo fields in any of the tables that this is pulling information from. Does anyone have a clue why this would be happening...please help..this is urgent.


Thanks - J

View 1 Replies View Related

Strings Within Strings Using Expression Builder

Jun 6, 2007

Hello

I have two tables with names of people in different forms.

table1 : [name] can be either in the form of :
- firstname & firstname surname
- surname, firstname

table2: [surname]

I'm trying to select all the records in table1 where [table2]![surname] is part of [table1]![name]

I've tried using

Like "*"&[surname]&"*"

This returns everything rather than the similar names.

I think this should be simple but can't work it out.

View 1 Replies View Related

Modules & VBA :: Creating A Small Loop To Run Code

Oct 1, 2013

creating a small loop to run code.For each record from AREA with PLANTPROGRAMID = VARIABLE Then...In this example, my table is called Area, my field is called plantprogramid, and my variable is defined earlier in code.

View 5 Replies View Related

Modules & VBA :: Passing Date Strings Into Access Chart

Sep 11, 2013

I would like the user to be able to select the months he wishes in case they want to look at calender year, financial year or just a custom group of months. If I use the wizard and pick dates say the start and end of the year I get the following code in the row source of the chart control:

Code:
SELECT (Format([DatePaid],"MMM 'YY")),Sum([TotalPaid]) AS [SumOfTotalPaid] FROM [Q_AllCust_Gross] WHERE ([DatePaid] BETWEEN #01/01/12# AND #31/12/13#) GROUP BY (Year([DatePaid])*12 + Month([DatePaid])-1),(Format([DatePaid],"MMM 'YY"));

So I decided all I needed to do was replace the dates in the above code with my own global varible which i would pass custom dates into via a form. Which I called getds() and getde()

Code:
SELECT (Format([DatePaid],"MMM 'YY")),Sum([TotalPaid]) AS [SumOfTotalPaid] FROM [Q_AllCust_Gross] WHERE ([DatePaid] BETWEEN >=#getds()# And <=#getde()# ) GROUP BY (Year([DatePaid])*12 + Month([DatePaid])-1),(Format([DatePaid],"MMM 'YY"));

View 4 Replies View Related

Modules & VBA :: Form With Multi-criteria Searches / Uses Strings And Filters

Jan 23, 2014

I have a search form with blank fields tied to a table, four criteria search boxes, and a button to take the input from the search boxes, search the table, and populate the results on the form's blank fields. As of now, it works as long as all four criteria boxes aren't null.I used filters to achieve this, and here's the code that works as long as all four boxes are not empty. (My criteria boxes are as follows: a textbox called "Keyword" and three combo boxes called HRCombo, BuildingCombo, and RoomCombo, and the fields they're tied to are as follows: "Item Description" "HR Holder" "Building" "Room") My first line "Me.Filter = ..." was broken up to make it easier to view.

Code:

Me.Filter = "[Item Description] Like " & Chr(34) & Me.Keyword & "*" & Chr(34) & "
AND [HR Holder] = '" & Me.HRCombo & "'" & " AND [Building] = '" & Me.BuildingCombo
& "'" & " AND [Room] = '" & Me.RoomCombo & "'"
Me.FilterOn = True
Me.Requery

I need it to be able to do the search no matter which combination of criteria boxes have input. Someone recommended using if statements to do the following: Create four strings, one for each criteria box. Use 4 if statements to check if the box is null - if it is null, assign an asterisk to its string, and if its not null, assign the value I used for the above Me.Filter statement to each box's string. Then, use Me.Filter and concatenate the four strings at the end. Here's the code I used for this, and, with my limited knowledge, I can't get it to work.

Code:

Dim StrA as String, StrB as String, StrC as String, StrD as String
If Me.Keyword is null then
StrA = "*"
else
StrA = [Item Description] Like " & Chr(34) & Me.Keyword & "*" & Chr(34)
End If

[code]....

View 14 Replies View Related

Modules & VBA :: Extract Strings From A Field In Table (Separated By Colon)

Oct 21, 2013

I have a field in a table that I'd like to extra the texts from. The are stored in below format (separated by colons). They don't always the same amount of characters and not all of them have the same amount of texts.

Some may only have Text1:Text2::, while some may have Text1:::Text4.

Text1:Text2:Text3:Text4

View 8 Replies View Related

Tables :: How To Receive Data From Two Fields

Feb 15, 2014

now i have two tables,

Table 1, containing Purchases Orders (P1,P2,P3,.......)
Table 2, containing Local Purchases (L1,L2,L3,L4,.....)

Now i want to make a thrid table that contains a field for all purchases in table 1 & 2, (P1,P2,P3,L1,L2,L3,L4,.....), if i make a lookup wizard that will retrieve only from one table but i want to retrieve data from the two tables.

View 2 Replies View Related

General :: Transmit / Receive XML From Access To Server

Jun 2, 2015

Any good program which will act as a B2B type gateway for MS access.

We currently have an access database which collects data and photographs of audits. This database is currently local and sends/receives data only whilst in the office. Ideally we'd like to do this over the internet by sending/receiving XML messages and somehow also photographs.

View 4 Replies View Related

How To Send A Form To Text Processor

Sep 23, 2005

Please Does Anyone Know A Way To Send A Form , Like Copying Text, To Word Processor Programme Like Word For Example.is There A Programme To Do That? Thanx

View 2 Replies View Related

Modules & VBA :: Storing Attachments On A Network

Jun 12, 2013

First, I'm developing both the Front End and Back End in Access 2007, and I intend to distribute the application using the Access Run Time. The powers that be will not let me use SQL Server.

The database is required to house attachments. Initially, I had created a separate back end database to store the attachments, but the file would quickly grow beyond the 2GB limit - roughly within 3 weeks. Instead, I decided to save the "attachments" in folders (named after the parent records PK ID) on the network. Using VBA, I would populate a list, based on the parent record, from which the user could select the file, do what needs to be done, then save it.

Unforunately, we're running into data security issues - all of the attachments will have private personal information - SSNs, Loan Numbers, Account Numbers etc., so they need to be stored in a location that's not universally accessible. All of the users have different permissions based on their department, acting as a very basic security level (i.e., Department 1 users will not be able to view any parent records associted with departments 2 or 3).

So I need a way for my back end to take a file located in a separate directory not normally available to the Front End User, then move that file (or save a copy that will be overwritten when re-attached to the record) to a location that IS accessible to my Front End User.

Can I create/use modules stored on the back end?

My first thought is to let the back end store the record in a temporary attachment table that is deleted when the user is done with it, but I've noticed that Access has trouble reclaiming the space when the attachment is ultimately deleted once the user is done using it, and I'll run into my 2GB limit again.

Alternatively, I could create a new .accdb file each time the record's attachments need to be accessed, and then delete that database once it's done and the attachments are returned to the secure location, solving my limit problems.

View 1 Replies View Related

Modules & VBA :: Deleting File From Network

Dec 2, 2014

I have a button that adds pictures/files to a network location. So people from all over the company can do this and all pictures/files are stored in one location.

I also have a delete button, but a waning pops up and the file remains on the network.

PHP Code:

Run-time error '424': object required 

Code:
My.Computer.FileSystem.DeleteFile (Path)

where Path is a string, files location on network.

View 4 Replies View Related

Modules & VBA :: Simulate Link To Network Path

Sep 10, 2013

I have a front end and a back end access files.My user save the back end on a shared network folder like:a.b.comfolderName$..I wish to simulate this path in my local pc in order to set the linked table links.My problem is that I can not modify my pc name to be "a.b.com".How can I simulate this in my windows 7 pc ..so I can set the linked table values to "a.b.comfolderName$" ?

View 8 Replies View Related

Modules & VBA :: Users With Different Mapped Network Drives

May 13, 2015

I need to make sure that all users on the network can access a specific network drive folder.

Most users don't have a problem but some users have the network drive mapped differently so when running the feature required their system can't find the file at that specified location.

I have the location of the files hard wired into the VBA code.

E.g. Z:INVDATACOMPANIESCompanyAASSETS Pty LtdPrecedents 2015STAGE 3A - COLLS-DEMS

The location is outside of the project address.

I need to be able to make sure the address of the folder is the same for all users.

View 3 Replies View Related

Modules & VBA :: Verify A Network Connection / Bad File Name Or Number

Mar 22, 2014

I have a picture stored on a network file share that populates each time a particular form is opened. Every so often we lose our connection (which is a different issue altogether). Right now the error I get after much grinding away, is "Bad file name or number"

Is there a quicker way to check for the connection before it spends 45 seconds trying to find the whole path?

Code:
Dim vFolderPath As String, dirFile As String, strFile As String
vFolderPath = Nz(DLookup("FolderName", "tblCodes-FolderControl", "FolderKey = '" & "Profile" & "'"))
dirFile = vFolderPath & Dir(vFolderPath & ctrl_people_id & " *", vbDirectory)
strFile = dirFile & "profile_pic.*"
'Debug.Print dirFile
On Error Resume Next
If Dir(strFile) <> vbNullString Then
Me.[ctrl_ImageFrame].Picture = dirFile & "" & Dir(strFile)
Else
Me!ctrl_ImageFrame.Picture = "X:~stuffprofile_icon.png"
End If

View 4 Replies View Related

Modules & VBA :: Identify Strings Into 2nd Table Records Then Update 1st Table

May 5, 2015

MS Access 2013: I have two database tables as below:

tbl1_MainDB --- It has a field named as "City" where I get huge data for some city names. Sometimes This field may have some unknown/new names which are not listed in our 2nd table ("tbl2_RefrDB")

tbl2_RefrDB --- It's a reference table which has raw names for cities, and then standard names of their city and state in another fields.

Target --- I want to create a VBA prorgram (Sql query) which can look from tbl1_MainDB.[City] to tbl2_RefrDB.[Raw_City] field, and if found then pick the "Standard_State" and "Standard_City" record values from there, and update into the 1st table "tbl1_MainDB".

...if not found in "tbl2_RefrDB" table, then user can be informed & ask for updating the new/unmatched city record as a new record in this table.

Attached sample database for more details.

View 4 Replies View Related

Modules & VBA :: Application Quit Doesn't Work On Network Users

May 26, 2014

My database is used by a few users on a shared drive in "read-only" mode so they can't change any data.I set a scheduled task to copy an updated version of the database (which I edit) every morning.

The problem is that when the users forget to close the database file I can't overwrite it.For this purpose I wrote a small code that quits the application at 00:00 using Application.Quit.The code WORKS when I test it on my computer, but every morning when I try to open the file I see that it is opened by another user since I also open it as "read-only" - meaning the code didn't work...getting the code to work properly OR get a better solution to be able to overwrite the file even though it's opened by other users.

View 10 Replies View Related

Modules & VBA :: Code For Querying A List Of Filenames Within Network Directory?

Dec 12, 2013

After several days of searching, I haven't been able to find any threads related to this. I'm making a search form that queries a pdf library table. Once a search query is entered, the user is able to open the files from a results form. Currently, I am entering the filenames from the network directory manually into the pdf library table.

For example, I manually enter the following information into the tblPDFLibrary table that contains the fields:

Date added, Filename, File Path, Series, Class, Title.

I was wondering if there's a way to have Access query all the filenames in the directory for me. In other words, if the directory contains the filenames: AccountsPDF, InventoryPDF, CustomerPDF. Can I have Access query all the filenames within the directory and automatically add all the file names (AccountsPDF, InventoryPDF, CustomerPDF) to the Filename field within the tblPDFLibrary table? If I am able to do this, I can code the other fields to populate information because the filename contains all the other field information (except for file path but I can program it insert the UNC path).

View 4 Replies View Related

Modules & VBA :: Network Crash - Any Way To Reconnect Objects Without Closing And Reopening Database

Oct 23, 2013

I have a database that runs a macro/report every 2 hours, however our network has been up and down lately. This causes the macro to fail when trying to log into the system because the table that is storing your username is no longer in the database. When I check, all tables, linked tables, forms, reports, macros and modules are all gone. I find the only way to get them back is to close the database and reopen.

What I want is a way to reconnect the objects without closing and reopening.

Is there a way to do this?

View 1 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







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