473,546 Members | 2,644 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trying to capture data from one table and place it in another

46 New Member
Hi,

I'm trying to find some records in a table that has been exported into Access (tbl_test). The new table that I am trying to create and insert the data to is called (tbl_test1).

Here's my code - I'm trying to find where the word 'Interval Type' starts to capture the data from there and on down a few rows. The 'Interval Type' row will be the name of the first field in the new table, and then the second row is blank so I tried looking for a row with a Null Value . . .after that row I want to capture all the data until I reach another Null row- and place all that data into the new table: tbl_test1.

I'm not able to come up with it - please tell me what i'm doing wrong.
Expand|Select|Wrap|Line Numbers
  1. Private Sub btntest_Click()
  2.    Set rstAllImported = CurrentDb.OpenRecordset("tbl_test", dbOpenTable)   ' this is the input table
  3.    Set rstSleepInterval = CurrentDb.OpenRecordset("tbl_test1", dbOpenDynaset) ' this is the actual data table
  4.  
  5. ' read the input table and see the record that has "Interval Type" can be found
  6.     rstAllImported.MoveLast
  7.     rstAllImported.MoveFirst
  8.  
  9. SkipRecord:
  10.     If rstAllImported.Fields("Actiware Export File  (Version 03#00 )") <> "Interval Type" Then
  11.         rstAllImported.MoveNext
  12.         GoTo SkipRecord
  13.     End If
  14. Me.lblTest.Caption = "success"
  15.  
  16.             Do While Not rstAllImported.EOF
  17.                 If rstAllImported.Fields("Actiware Export File  (Version 03#00 )") Is Null Then    ' find first blank record found
  18.                     'If rstSleepInterval.NoMatch Then
  19.                         Put_Interval_Data
  20.                     'End If
  21.                 Else
  22.                     Me.lblnumberthree.Caption = "is this working?"
  23.                 End If
  24.  
  25.                 rstAllImported.MoveNext
  26.             Loop
  27.  
  28.     rstAllImported.Close
  29.  
  30. End Sub
Dec 18 '08 #1
3 1682
NeoPa
32,564 Recognized Expert Moderator MVP
As a full member now, you should know that we expect your code to be posted in [code] tags (See How to Ask a Question and indeed the instructions in the posting window itself).

This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

Please use the tags in future.

Administrator.
Dec 21 '08 #2
NeoPa
32,564 Recognized Expert Moderator MVP
Having tidied up the code display somewhat I find I am still at a loss trying to understand your question.

I would at least like to see if I can help. Unfortunately the explanation doesn't seem to be made up of any logical sentences. If you'd like to see if you can explain your problem in clear English (I don't intend to reverse engineer your code to save you the bother of asking the question properly), then I can promise I will at least look at it again.
Dec 21 '08 #3
missinglinq
3,532 Recognized Expert Specialist
As a full member, you should also know better than to post a problem more than once! Your duplicate posting of this problem has been deleted! Please refrain from this prohibited behavior in the future.

From FAQs

Do Not Double Post Your Questions

Double posting is where you start a thread on a topic and then for some reason start another thread on exactly the same topic in the same forum. Please do not do this because

1. It makes it very hard for people to answer you especially if there are answers happening in all the threads you have started because they have to read 2 or more threads in order to see what has already been said.

2. It swamps the forum with your problem resulting in less attention for the other threads.

If you feel for some reason that you post has been overlooked (for instance it hasn't had any replies) please do not repost the question. Post a message to the thread you started, this will bump it back to the top of the thread list for the forum.

Thank you for your attention in this matter.

Linq ;0)>


Moderator
Dec 22 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
5711
by: NK | last post by:
Hi, We have a webpage that has a form available on the intranet. A user will have a window open that runs a different application open. When the user accesses the webpage and clicks a button we should capture the data from the application window and populate the form. Is it possible to access text inside another opened window on the...
0
1488
by: Mark Barinstein | last post by:
Hello. W2K, db2 v7, FP10a. Before now our replication worked properly. But some days ago capture suddenly stopped loggin and filling cd tables without any messages. The last message was like this: -- 2004-03-03-09:17:36 ASN0105I: Data that has been copied was pruned from the change data table ASN.IBMSNAP_UOW at SEQ = ...
2
4130
by: Iain Miller | last post by:
Struggling a bit here & would be grateful for any help. I have a table which has a list of people in it. Each person has a unique ID automatically allocated by Access but also belongs to one of 5 Groups - call them A to E. I'd like to generate a further automatic reference number based on something like Group/Unique ID so when I create a...
11
2591
by: hazz | last post by:
before I start filling up the first page of perhaps many pages of code with if/then or switch:case buckets, I wanted to step back and see if there is a better way... I will have a table with up to 300 rules in it. Maybe more... In each Score table there is a column which will refer to a domain specific table and another table column that...
8
2568
by: Ken Sturgeon | last post by:
I have a button inside a panel control. Apparently I can't expect VB to respond to the button's _Click event. How do I capture the click event? Thanks Ken
11
11117
by: Ron L | last post by:
I have a barcode scanner which uses a "keyboard wedge" program so that the data it scans comes through as if it was typed on a keyboard. I am trying to have the data in the barcode be displayed in a text box. I know that there are certain control characters embedded in the data that I want to display substitutions for in the text box, for...
17
3514
by: Timothy.Rybak | last post by:
Hello all, This is my first attempt at an application, so kid gloves are appreciated. I need to make a very simple form that only has a few elements. One is TraceCode - a text field that is populated when a user scans a label. The other is ScanDate - a date/time field that should equal the date/time of the scan (e.g. 7/31/2006 5:00:00...
3
3540
by: questionit | last post by:
Hi I know i have posted similar question before but there is something i need to ask further to that. If you have many text-boxes on the form and you want to check if any changes to the data in the textfields is made , how would you capture the changed data (the new data) . And if you want to capture the old data as well (the one that got...
3
1118
matrekz42
by: matrekz42 | last post by:
Good afternoon gents, I'm trying to capture a dollar amt for a specific table running a link from another table. So I have the first and the second , and I'm trying to capture all the payments from the first action that >= the second , however there are some from the first table that have 2 digits, therefore the expression won't...
0
7504
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...
0
7435
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...
0
7694
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. ...
0
7792
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...
0
5080
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3491
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...
1
1921
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
747
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...

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.