473,402 Members | 2,064 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,402 software developers and data experts.

How to add a field not in field list to an access report

I am pretty new to editing things in vba access. I have a report that didn't have a field that I needed in the field list, I modified the recordsource query, it is a sql pass through query:
SELECT dbo.SalesOrderDelivery.SOD_RecordID,dbo.SalesOrder Delivery.SOD_UserDef1,dbo.SalesOrderDelivery.SOD_U serDef2, dbo.SalesOrder.SOM_SalesOrderID, dbo.SalesOrderline.SOI_PackslipDesc,dbo.SalesOrder .SOM_SpecialInst, dbo.SalesOrderLine.SOI_SOLineNbr, dbo.SalesOrderDelivery.SOD_RequiredDate, dbo.Shipment.SH_ShipDate AS SOS_ShipDate, dbo.ShipmentLine.SHL_ShipQty AS SOS_ShipQty, dbo.ShipmentLine.SHL_CertificationNbr AS SOS_CertificationNbr, dbo.Shipment.SH_PackingSlipNbr AS SOS_PackingSlipNbr,

That's part of it, but basically I typed in the CertificationNbr entry. When I run it in the query screen, I am able to pull the cert# from the table, and get the field to appear on the field list in the report. I then proceed to put it on the report, save the report, and compile the files in our ERP software. After I compile the files, if I re-open the report and query my addition to the query is gone.

I know I'm probably missing a step somewhere, but have no idea what else to try. Thanks in advance for your help.
May 27 '10 #1
4 2496
patjones
931 Expert 512MB
I then proceed to put it on the report, save the report, and compile the files in our ERP software. After I compile the files, if I re-open the report and query my addition to the query is gone.
I'm not sure what you mean by this, especially "compiling [the] files in our ERP software".

When you save the report, how are you doing it? Exporting it to text file, PDF, or something like that? Please clarify.

Pat
May 28 '10 #2
I'm saving it in Access. The Access files our used by our ERP software to generate reports. When something is changed in the Access files the software requires you to compile the mdb files.

Did I go about modifying the query correctly? I'm just wondering if typing in the new field I wanted and then saving (closed it and it asked me if I wanted to update the recordsource) was the right step to take. After I did add it in the query, it was in the field list in the report and would pull the value I wanted from the table. It was just after compiling that it went away.

I know that probably sounds confusing. Thanks for your help.
May 28 '10 #3
patjones
931 Expert 512MB
When you open the report inside Access itself (either Report View or Print Preview) does the added column appear?

I'm not sure what the ERP software does or what it's purpose is, but if I had to make a guess I would say that what it's doing is accessing the tables inside your database. If that is the case then naturally your added column isn't going to appear, because you added your column to a report that is internal to Access, not the underlying table on which everything else is based.

Pat
May 28 '10 #4
Yes, the added column appears in design view of the report. Our ERP software actually uses Access as it's main interface to generate reports. In order to edit anything in the mdb files you open up the ERP software in Admin mode and at the same time it opens access.

Once I have the ERP software compile the MDB files, and open the ERP software in normal user mode, make a call to generate the report, my added data comes back with an error. If I then re-enter the ERP software in admin mode and look at the report and underlying query my addition that I made to the query is gone.

I know this is a weird issue and may have everything to do with our ERP software and not the way I edited the query in Access, but I just wanted to see if I was even editing the query correctly.

Thanks again.
May 28 '10 #5

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

Similar topics

3
by: Nicola | last post by:
Hi Everyone, I am new to programming and would like to know how to open an access Report from within vb 6. I am trying to write a program to organise cross stitch threads. I have found out how...
2
by: Tom Weddell | last post by:
Can I call an Access report from VB.Net? (I'm using access as the backend.) Thanks in advance.
3
by: trustme1 | last post by:
I am wanting to be able to write reports against an ms-access database that is part of another package. I only want to report from the database. What I need is a package that will allow me to...
8
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At...
4
by: Greg Teets | last post by:
I am running an Access report from VB via ADO. The report has a field that shows the time it was run. Is it possible to return the data from this field to VB when the report runs? Or to find...
4
by: dkelly925 | last post by:
I have an Access Report that I am trying to enter an "If Statement" that when a certain field exceeds a certain number of lines or a certain number of characters that field is not visible and...
9
by: RMC | last post by:
Hello, I'm looking for a way to parse/format a memo field within a report. The Access 2000 database (application) has an equipment table that holds a memo field. Within the report, the memo...
8
by: ljungers | last post by:
Wondering if somone knows how to open a Access report in Word or export it to Word. Currently I'm opening and printing a report using VBA with the following command (DoCmd.OpenReport "TheReportName",...
1
by: sonicfun2006 | last post by:
I have SQL Server Database and MS Access 2003 is connected with ODBC. I have very large amount of records in various tables. The database is very dynamic as it changes every minute. I’m trying to...
3
by: blees10 | last post by:
Hi Everyone, I am working on an Access report and the client is asking for nitpicky things so I am working on a way to make this work. I have a couple questions and they are not related. 1. I...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.