English 中文(简体)
阅读关于接触武器的文本文件
原标题:reading a text file in ms access
  • 时间:2012-04-26 14:59:31
  •  标签:
  • ms-access

我拥有一些数据的文本档案,即要打开文本文档,把数据复制到盒式田中,如果用同样的表格点击事件,我会这样做。

文本档案非常简单,有一栏,有6行。

12
2.5
6.7
9.5
3.4
7.6

我想以这样的形式把这些数字放在田里。

最佳回答

这里的一个例子是,如何向贵形式的领域开放文本档案和复制一个领域。

Dim MyStr1 as string
dim MyStr2 as string

Open "TESTFILE" For Input As #1
Do While Not EOF(1)      Loop until end of file.
    Input #1, MyStr1, MyStr2
    me.txtStr1 = MyStr1
    me.txtStr2 = MyStr2
Loop
Close #1      Close file.

(例如,通过多个渠道,但你可以同样地打开通道,并且按照你的意愿,单独为每一行做——这取决于你的文本文件是如何编排的)

http://msdn.microsoft.com/en-us/library/a733686%28v=vs.60%29.aspx”rel=“nofollow”

问题回答

暂无回答




相关问题
Handling no results for docmd.applyfilter

I have an Access app where I use search functionality. I have a TextBox and a Search Button on the form, and it does a wildcard search of whatever the user enters in the TextBox, and displays the ...

access query to filter and combine count

i have two access tables tableA num count 1 7 2 8 3 9 4 9 5 13 6 6 tableB num count 0 1 1 14 2 12 3 5 4 5 5 11 6 5 how can i create an access query that ...

How to show File Picker dialog in Access 2007?

I want to show a dialog where the user can pick a file, click OK, and then the path to the file will be saved in the database. I have just one problem, I can t figure out how tho show the dialog ...

MS Access: list macro from VBA

I have to deal with a few macros (not VBA) in an inherited Access application. In order to document them, I would like to print or list the actions in those macros, but I am very dissatisfied by ...

Returning row number on MS Access

I have 4 tables, from which i select data with help of joins in select query...I want a serial no.(row number) per record as they are fetched. first fetched record should be 1, next 2 and so on... In ...

热门标签