473,383 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

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 3136
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
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...
1
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...
5
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....
9
by: pranav.choudhary | last post by:
Hi I am new to python. I wanted to know if there is an opposite of "import"
1
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...
1
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:...
49
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...
9
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
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.