Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default adding record to database

having a problem adding a record to a dbf file, is this possible?

i gave code that opens the dbf, adds a row of data and when i save it as the
dbf, the record is not there. but if i open it, change an existing record
and save it, it works fine.

just wondering if i'm chasing my tail.

--

Gary Keramidas
Excel 2003


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default adding record to database

If you didn't get an error there is 3 possibilities

1) You didn't get to the line where you are actually writing the data to the
database. Put a break point in the macro where you are writing the new data
by clicking on the line of the macro and pressing F9. See if you get to the
line you are expecting.
2) You wrote the data but you are not seeing it in the table. The table may
be filtered. Look at the raw data in the database tool like opening up
Access.. Also check the entire file for the record because to may of gotten
sorted or filtered. do a search using the Access of the database tool to
make sure it is not there.
3) You saved the file to another location on your PC and you are looking in
an older file
"Gary Keramidas" wrote:

having a problem adding a record to a dbf file, is this possible?

i gave code that opens the dbf, adds a row of data and when i save it as the
dbf, the record is not there. but if i open it, change an existing record
and save it, it works fine.

just wondering if i'm chasing my tail.

--

Gary Keramidas
Excel 2003



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default adding record to database


it doesn't even work when i do it manually, let alone through the code. like
i mentioned, changing a record works, so the file is not in a different
location. the dbf only shows 1 record in the statistics, so i know another
record never got added.
--

Gary Keramidas
Excel 2003


"Joel" wrote in message
...
If you didn't get an error there is 3 possibilities

1) You didn't get to the line where you are actually writing the data to
the
database. Put a break point in the macro where you are writing the new
data
by clicking on the line of the macro and pressing F9. See if you get to
the
line you are expecting.
2) You wrote the data but you are not seeing it in the table. The table
may
be filtered. Look at the raw data in the database tool like opening up
Access.. Also check the entire file for the record because to may of
gotten
sorted or filtered. do a search using the Access of the database tool to
make sure it is not there.
3) You saved the file to another location on your PC and you are looking
in
an older file
"Gary Keramidas" wrote:

having a problem adding a record to a dbf file, is this possible?

i gave code that opens the dbf, adds a row of data and when i save it as
the
dbf, the record is not there. but if i open it, change an existing record
and save it, it works fine.

just wondering if i'm chasing my tail.

--

Gary Keramidas
Excel 2003




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default adding record to database

If it doesn't work manually then the file must be protected. try copyiong
the file to your local drive that you know you have write permission and
agin try changing it manually. When you add an item manually does it get
added but the changes do not get saved? the file must be write protected.

"Gary Keramidas" wrote:


it doesn't even work when i do it manually, let alone through the code. like
i mentioned, changing a record works, so the file is not in a different
location. the dbf only shows 1 record in the statistics, so i know another
record never got added.
--

Gary Keramidas
Excel 2003


"Joel" wrote in message
...
If you didn't get an error there is 3 possibilities

1) You didn't get to the line where you are actually writing the data to
the
database. Put a break point in the macro where you are writing the new
data
by clicking on the line of the macro and pressing F9. See if you get to
the
line you are expecting.
2) You wrote the data but you are not seeing it in the table. The table
may
be filtered. Look at the raw data in the database tool like opening up
Access.. Also check the entire file for the record because to may of
gotten
sorted or filtered. do a search using the Access of the database tool to
make sure it is not there.
3) You saved the file to another location on your PC and you are looking
in
an older file
"Gary Keramidas" wrote:

having a problem adding a record to a dbf file, is this possible?

i gave code that opens the dbf, adds a row of data and when i save it as
the
dbf, the record is not there. but if i open it, change an existing record
and save it, it works fine.

just wondering if i'm chasing my tail.

--

Gary Keramidas
Excel 2003





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default adding record to database

when i add a record manually, save the file it saves fine. i then open it
with the dbf app, the record is not there. if i open the same file, change
data, it saves fine and when i open the dbf, the data is changed.

the file is not write protected.

--

Gary Keramidas
Excel 2003


"Joel" wrote in message
...
If it doesn't work manually then the file must be protected. try copyiong
the file to your local drive that you know you have write permission and
agin try changing it manually. When you add an item manually does it get
added but the changes do not get saved? the file must be write protected.

"Gary Keramidas" wrote:


it doesn't even work when i do it manually, let alone through the code.
like
i mentioned, changing a record works, so the file is not in a different
location. the dbf only shows 1 record in the statistics, so i know
another
record never got added.
--

Gary Keramidas
Excel 2003


"Joel" wrote in message
...
If you didn't get an error there is 3 possibilities

1) You didn't get to the line where you are actually writing the data
to
the
database. Put a break point in the macro where you are writing the new
data
by clicking on the line of the macro and pressing F9. See if you get
to
the
line you are expecting.
2) You wrote the data but you are not seeing it in the table. The
table
may
be filtered. Look at the raw data in the database tool like opening up
Access.. Also check the entire file for the record because to may of
gotten
sorted or filtered. do a search using the Access of the database tool
to
make sure it is not there.
3) You saved the file to another location on your PC and you are
looking
in
an older file
"Gary Keramidas" wrote:

having a problem adding a record to a dbf file, is this possible?

i gave code that opens the dbf, adds a row of data and when i save it
as
the
dbf, the record is not there. but if i open it, change an existing
record
and save it, it works fine.

just wondering if i'm chasing my tail.

--

Gary Keramidas
Excel 2003








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clone a record, edit it and add as new record to database. [email protected] Excel Programming 0 October 26th 07 04:34 PM
Database record add Oldjay Excel Programming 2 October 13th 06 02:09 AM
Database Record add Oldjay Excel Discussion (Misc queries) 1 October 13th 06 02:07 AM
Using Excel as a database and need macro or vba to take data entered on one tab and update the database by adding to the next avail row rjr Excel Programming 5 June 11th 06 09:43 PM
Printing a database record Fiat-Lux Excel Discussion (Misc queries) 1 February 11th 06 12:02 PM


All times are GMT +1. The time now is 01:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"