473,699 Members | 2,539 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

import form code

I have made a number of changes to the code of an access 2000
application, and now the person responsible for the application wants
to import one change at a time into his "master copy", after he has
understood the change.

Most of the code in this application is in the forms. I find that I can
export the code, and I can import the code of the modules, but I cannot
import the code of the forms. I have exported the code of the forms to
one file per form, and I use Unix utilities to find the differences
between his master version and my version.

One logical change can affect the code of many forms, e.g., if a global
variable name is introduced instead of a string litteral repeated
everywhere. To do everything completely by hand implies a high risk of
comitting some error.

I can use Unix utilities to selectively patch a copy of the master
version with chosen changes. That means I can relatively easy create
patch files each containing one logical change, and apply one such
patch to the set of files that will become the next version of the
master, with a single command.

The only problem that stops the show is that I cannot easily import the
modified source code into the forms of the Access application. It seams
that I have to open each form one at the time, delete all the code, and
paste in the new version of the code from some editor. There are more
than forty forms, so that means opening forty files in the editor,
opening the corresponding form in the Access Basic editor, etc. This
only to import one logical change. Then test, etc. There is no way I
can have the attention of the responsible person for so long time.

I am not very expert in ms-access, but I guess that if I can
copy-and-paste the code of a form, it is perhaps a way to do the same
through a macro or some other basic code. I could add a special-purpose
form with a button to import all the code files in a specified
directory.

But what macros or basic commands can I use? Any tips?

Regards, Enrique Perez-Terron

Nov 13 '05 #1
1 3178
The (semi-)Undocumented SaveAsText and LoadFromText is one way to do
this, though you'll have to pass over all the lines that declare and
format the form itself as well as the controls on the form.

I think you can also get at it by going through the documents
collection, but I can't seem to be able to find an example of that at
the moment to confirm it. I know I've done this before, but my memory
appears to be failing on this.... (Getting old sucks!)

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3812
by: George P | last post by:
I've run into a strange package related namespace problem. Follow these steps (on UNIX system) to illustrate: ------------------------- mkdir /tmp/mypkg cd /tmp/mypkg touch __init__.py echo 'import os\ndef test():\n print os.getcwd()' > os.py cd /tmp
1
8221
by: KS | last post by:
Hi, I have creatd a custom Outlook form with a few custom form fields. When completed the form is sent to me and goes into my Inbox. This works fine. Now Iam trying to write some code in Access to import l;oop though my inbox and pick up all the usesr defined field data from any messages froma specific subject. I have have mixed and matched some code I found on the net however it doesn't seem to work properly. problems I face are:
5
2729
by: strauss.sean | last post by:
Hi! I am trying to import a query as a table from a MS Access database in a specified drive, path, and filename; my filenames and paths are being stored in a table for easy reconfiguration. Anybody done this before? Please let me know! Thanks, Sean BTW: I have learned that if I wanted to import a table, this is how it's done: DoCmd.TransferDatabase acImport, "microsoft access", "C:\Folder\file.mdb", acTable, "sourcetable",...
9
9185
by: pranav.choudhary | last post by:
Hi I am new to python. I wanted to know if there is an opposite of "import"
1
8706
by: baling | last post by:
Hi.... Hi everybody, i have a code that i make in VBA and know I want to use this code in to VB6. But i don't know how to use that code in to VB 6.0 Please correct this code so i can use it in VB 6.0. Code: --- use in mainform ------- Option Compare Database Option Explicit
1
4554
by: Steve | last post by:
Hi All, I have an Excel file being delivered to a shared drive where I only have read access on a daily basis. The files arrive in the following format 'Filename+timestamp.xls' Example: ThisFile2007-02-01 11.02.00.421.xls Is there a way a can create some sort of link that matches a pattern? If file name starts with 'ThisFile'
49
3927
by: Martin Unsal | last post by:
I'm using Python for what is becoming a sizeable project and I'm already running into problems organizing code and importing packages. I feel like the Python package system, in particular the isomorphism between filesystem and namespace, doesn't seem very well suited for big projects. However, I might not really understand the Pythonic way. I'm not sure if I have a specific question here, just a general plea for advice. 1) Namespace....
9
5774
by: a | last post by:
Dear friends I want import data from CSV file to mdb file How can I do that in vb.net?
2
4849
by: Constantine AI | last post by:
I am wanting to import CSV files into Access, which isn't a problem at the moment the code i have is as follows: Dim strSQL As String Dim CSVTable As String Dim FilePath As String Dim Result As String strSQL = "DELETE * from csvordlin" CSVTable = "csvordlin" FilePath = InputBox("Please Enter a Path File for the CSV Location!", "Criteria Required")
0
8687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8615
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9174
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8883
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7750
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4376
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2347
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2009
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.