473,386 Members | 1,969 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,386 software developers and data experts.

main form disappears after paste-append action using VBA

Hello,

I have an access 2003 database in which I built the opportunity to make
a list of data in Excel and paste it later in the access-database.

When a user copied the excel-data (just using plain ctrl-C) there's a
button in the database pasting it in the correct table. I pasted the
code below:

On Error GoTo Err_Paste_data__back_to_Access_Click

If Nz(Forms![FSwissQuote]![Customer], 0) = 0 Then
MsgBox "You have to select a customer first! Please correct the
problem and paste again afterwards.", vbCritical, "Please choose a
customer first!"
Cancel = True
GoTo Exit_Paste_Data_Back_To_Access_Click
End If

Forms![FSwissQuote]![FQuoteLines].SetFocus
DoCmd.GoToControl "Quantity"
DoCmd.RunCommand acCmdPasteAppend

Exit_Paste_Data_Back_To_Access_Click:
Exit Sub

Err_Paste_data__back_to_Access_Click:
MsgBox Err.Description
Resume Exit_Paste_Data_Back_To_Access_Click

This code works fine on my machine. On another machine (using Terminal
Server) however, the result is that the data is copied, but the main
form completely disappeared. The user only sees the just copied records
in the subform in data-sheet format. Does anybody has any clue as to
how this is possible and what I can do to solve it?

Regards,
Johan.

Nov 13 '05 #1
0 1895

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

Similar topics

1
by: William Starr Moake | last post by:
The browser-based WYSIWYG editor I'm developing has a popup window with a form that generates table code from user input (width, border, cols, rows, bgcolor.) But the user has to copy-paste the...
0
by: Peter Franklin | last post by:
(Access 2000) On a subform's current event, I have the following coding: Parent!workshopId=Me!workshopId This so I can change the contents of a second subform when the selected row in the first...
4
by: Colin McGuire | last post by:
Hi again, thanks everyone for your previous help. But having resolved past problems, I'm moving on to new problems :( This one is a simple winforms application with two buttons, named Button1...
18
by: Colin McGuire | last post by:
Hi - this was posted last weekend and unfortunately not resolved. The solutions that were posted almost worked but after another 5 days of working on the code everynight, I am not further ahead....
3
by: Nathan | last post by:
I read an earlier post from Gary and answered by Peter Huang concerning closing one form and showing another. I need to do the same thing in my application, but the code Peter gave didn't work for...
39
by: jcrouse | last post by:
I am using the following code to get a background image for my form Private Sub mnuBgroundImage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuBgroundImage.Clic If...
7
by: Jaggu | last post by:
Hi , I need to close main window, once the child window succesfully opens else main window to remain. In my case when I close the main window immediately after the "window.open()" as mentioned...
1
by: Bill | last post by:
Problem: Combo box data disappears from view when a requery is done See "Background" below for details on tables, forms & controls On a form, I want to use the setting of bound combo box C1...
2
by: Narvs | last post by:
I have a main form with information on people hired and on this form I have a button that you click to term an employee which opens a new dialog window to enter a term date. Now it doesn't remove...
2
by: OfficeDummy | last post by:
Hi, everyone! Like I mentioned in the thread title, I need to copy&paste data between different workbooks, and it works fine. However, when the data has been copied to the destination workbook,...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...
0
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...
0
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,...

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.