User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS Access and FileMaker Pro section within the Web Development category of DaniWeb, a massive community of 374,006 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,741 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS Access and FileMaker Pro advertiser:
Views: 471 | Replies: 2
Reply
Join Date: Mar 2008
Posts: 17
Reputation: clueless101 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
clueless101 clueless101 is offline Offline
Newbie Poster

Creating data files

  #1  
Apr 7th, 2008
I need to create a data file called students.dat and insert a few records into it.

I need (3) fields: 1) student id no. 2) last name 3) first name

I thought it would be pretty straight forward, but I get a compile error: Invalid Outside Procedure and "students.dat" is highlighted. Can anyone help me out on this? Thanks in advance.

Here is my code thus far.

Option Compare Database
Option Explicit

' Create Students Data file

Open "students.dat" For Output As #1

Write #1, "123-00", "Joan", "Blake"
Write #2, "560-05", "Mary", "Smith"

Close 2
Last edited by clueless101 : Apr 7th, 2008 at 11:59 am.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2008
Posts: 17
Reputation: clueless101 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
clueless101 clueless101 is offline Offline
Newbie Poster

Re: Creating data files

  #2  
Apr 7th, 2008
After some persistence, I was able to create/insert records to the data file.

But, I'm not having any luck with the 2nd part of my assignment, which is to create a form permitting a user to view all records in the data file via populating records to a list box. I also have to use error handling when opening the data file.

Can anyone get me started in the right direction for this added task? I've added a button and list box to a form, but can't get the records to load...

Any assistance is greatly appreciated.
Reply With Quote  
Join Date: Mar 2008
Posts: 17
Reputation: clueless101 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
clueless101 clueless101 is offline Offline
Newbie Poster

Re: Creating data files

  #3  
Apr 8th, 2008
Solved this one on my own. Thanks anyway. It took me all night, but it's worth it when it works!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MS Access and FileMaker Pro Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MS Access and FileMaker Pro Forum

All times are GMT -4. The time now is 10:22 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC