Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Calculated Field At Runtime MS Access


I have a database that dynamically creates queries using SQL, based on conditions the user selects. What I need to do now is to add a calculated field for these queries at runtime in code, the problem is I don't know how.
Also is there some way of sorting the field lists in combo boxes (perhaps using a query to get the fields from a table instead of using the field list type of the combo box itself) alphabetically?

Thanks




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Using VB Expression For A Control Box To Update An Access Table From A Calculated Field
Here is what I am trying to do.

I have an Access 2000 database that has a table named products, a form named products_form, and a sub-form named products_sub-form. On the Products sub-form and the products form the field "QuantityOnHand" is a calculated field.
The control source for the field is written as below:

 =Sum(nz([UnitsReceived])-nz([UnitsShrinkage])-nz([UnitsSold]))

I want the value of the calculation to be inputted and stored in the Products Table. Can you please help me with using a VB expression and a controlbox for this. I do not know how the code should be written.




 

Calculated Field Problem
hi,
I have a subform in Access, which has a field which is a calculated field , but it is stored in the table.
Now Let me explain what i want to do...........
In a purchase order module,
-->The user selects a currency(like dollar,Euro etc) which is a part of the main form. It is a combobox which retrieves the conversion rate from the specifed currency to the Local currency.
-->The user then enters items in the subform. When the user enters the "UNIT COST" , i want it to get immediatley converted into its value in the Local currency using the value stored in the Currency combobox.

How can I do this?

Thanks in advance.

Can I Put A Calculated Field Into A Userform?
I currently have a userform which has two text boxes Forecast & Reported. I would like to add a third which will display the difference between the two.

I would then like to populate this data onto a worksheet using the saverow() command.

Can this be done? My knowledge is quite limited so any advice would be much appreciated.

Thanks

JP

Add A Calculated Field To A Dbgrid
I have a form that contains a dbgrid.
The dbgrid includes 3 columns that contain numeric values.
My databases do not contain a total field of these 3 values.
I would like to add another column to the dbgrid that would be the total of the 3 columns.
I have tried sum(f1+f2+f3) as total but get errors.
Any advice ?
Appreciate it.

Datareport Calculated Field
I am working on a report that requires me to calculate percent changed
based on records returned from a query. ((Field2-field1) / field1) *100

I can get this to work using rptLabel control for the first record only. When I go to the next record/page the calculated fields ( label.value) are not updated.

Is there any way to do this?

Calculated Field In Sql Statement
OK, I have a question:
If I have jobQuota, numJobComp, and hoursWorkedOnJob as variables, and jobQuota obviously is the quota for that particular job, numJobComp is the # that the person actually completed that day, and hoursWorkedOnJob is the # of hours they worked on that job that day.

Anyway, so I have a table full of entries for different dates. What I am trying to do is get a total percentage of quota based on all the records. I have been trying to do something like the following; Sum([numJobComp])/((Sum([hoursWorkedOnJob])/(8*Count([jobQuota])))*Sum([jobQuota])) but I don't think that it quite works. The part with 8*Count([jobQuota]) is because jobQuota is based on an 8 hr work day, but not all people work an 8 hr work day. Any idea what a good way to do this would be? I am trying to calculate this for in an sql statement, and here is that just in case it helps at all:


Code:
SELECT tblEmployees.EmpName, Sum(tblJobList.jobQuota) AS SumOfjobQuota, Sum(tblDailyCapture.numJobComp) AS SumOfnumJobComp, Sum(tblDailyCapture.hoursWorkedOnJob) AS SumOfhoursWorkedOnJob, Sum([numJobComp])/((Sum([hoursWorkedOnJob])/(8*Count([jobQuota])))*Sum([jobQuota])) AS Expr1, tblIncludeJobsEval.evalID, tblJobList.jobName
FROM tblJobList INNER JOIN (((tblEmployees INNER JOIN tblDailyCapture ON (tblEmployees.empID = tblDailyCapture.empID) AND (tblEmployees.empID = tblDailyCapture.empID)) INNER JOIN tblEvaluations ON (tblEmployees.empID = tblEvaluations.empID) AND (tblEmployees.empID = tblEvaluations.empID)) INNER JOIN tblIncludeJobsEval ON tblEvaluations.evalID = tblIncludeJobsEval.evalID) ON (tblIncludeJobsEval.jobID = tblJobList.jobID) AND (tblJobList.jobID = tblDailyCapture.jobID) AND (tblJobList.jobID = tblDailyCapture.jobID)
WHERE (((tblDailyCapture.dateEntered) Between [beginDate] And [endDate]))
GROUP BY tblEmployees.EmpName, tblIncludeJobsEval.evalID, tblJobList.jobName
HAVING (((Sum(tblJobList.jobQuota))<>0) AND ((Sum(tblDailyCapture.numJobComp))<>0) AND ((Sum(tblDailyCapture.hoursWorkedOnJob))<>0));

Calculated Field - Resolved
Can someone point me in the right direction:

I have a data1 control and its properly linked to a dbf file and the database is working great... but what im trying to do is have a calculated field. Something like:

Total = Qty1 * Units

Total is a textbox
qty1 and units are textboxes as well linked to fields in the database.

Now here's my problem... The calculated field updates when I hit next record but its calculated from the previous record

Any help or direction will do.

Thanks

Calculated Field In Datareport
Hey
 
I've created a datareport based on an sql server.
I've two fields in my table: sales and sales_last_year.
I've got a calculated field in my sql command called difference and it is based on sales - sales_last_year.

What i also want is a field : procent which is based up on (sales - sales_last_year) / sales_last_year so that i can display
in procent the difference between this year and last year.

The problem is that sales_last_year can be 0. You can't split thru 0.
I don't want to define in the where clause where sales_last_year <>0 because I need the other fields even when this field is 0.

I was thriing with IIf(sales_last_year = 0 ; "-"; (sales - sales_last_year) / sales_last_year) as procent but it doesn't work

Can somebody help me!

Greetz
Maeske



Edited by - Maeske on 5/26/2003 2:29:27 AM

Returning A Zero In Calculated Field
Hello everybody, newbie...........................

SQL query, is there a way to return a zero in a calculated field instead of nothing
when the calculated field is empty?

Thanks a lot

Storing Calculated Field
Hello all,

I have a calculated field on a form, which I would like to store in a field in a table. I would think that this'd be a pretty common thing to do, but I haven't found any help files or threads that demonstrate how to do this. The field is a textbox and the expression is (of course) in the ControlSource property. Any suggestions for how I can store that field in a table? Thank you!

Cheers,
Stephanie




Edited by - CcSteff on 8/19/2004 4:35:32 AM

Pivot Table Calculated Field
How can I add calculated field in a pivot table at run time? Is it possible to use the sub-total field in the calculated field formula?

Adding A Calculated Field To A Datagrid...
Hi,

i asked this quastion once and no one answered me...
I have a function Age() on my module, it gets a date and calculates the age of this person with this date of birth...
I have a players table and when i put it in a datagrid i want to add another column which will use the players' date of birth and calculate this persons age, using the function on my module...

how can i do it?

please help... thanks a lot.

Disconnected Recordset && Calculated Field
Hi all,

I have a disconnected recordset(batchupdate) which contains a calculated field. I have bound the recordset to a datagrid. If I add new records, the calculated fields are appearing only after executing the method UpdateBatch. Is there a way to disply the calculted fields immediatly after adding new records?

Regards
Sabish

How To Find Subtotal Of Calculated Field?
Hi all,
It is a doubt from crystal reports. How can I
find Subtotal for a calculated feild named Amount?

Amount is sum(feildX) * fieldY

Calculated field is not shown in subtotal option
list....

Is it possible then how?? Please help me...

Sujith Kumar

Why My Calculated Field Cannot Be Updated Into Database?
Hi..
I have Adodc, 3 fields, Amount, Entitlement and AmountToBePaid and 2 buttons, cmd_Add and cmd_Save. This is the code,

Code:Private Sub cmd_Add_Click()
Adodc1.Recordset.AddNew
End Sub

Private Sub cmd_Save_Click()
Adodc1.Recordset.Fields("amount" ).Value =
txtAmount.Text
Adodc1.Recordset.Fields("entitlement" ).Value =
txtEntitlement.Text
Adodc1.Recordset.Fields("amounttobepaid" ).Value =
txtAmountToBePaid.Text
Adodc1.Recordset.Update
Adodc1.Recordset.Requery
End Sub

Private Sub txtAmountToBePaid_LostFocus()

Dim Amount As Currency
Dim Entitlement As Currency

Amount = Val(txtAmount.Text)
Entitlement = Val(txtEntitlement.Text)

AmountToBePaid = Amount - Entitlement
txtAmountToBePaid.Text = AmountToBePaid
txtAmountToBePaid.Text = FormatCurrency
(AmountToBePaid)
txtAmount.Text = Format(txtAmount.Text, "currency" )
txtEntitlement.Text = Format
(txtEntitlement.Text, "currency" )

End Sub

When i click Add and then Save button, the data for Amount and Entitlement is updated into database but not AmountToBePaid. Any idea?

Thanx..

Disconnected Recordset && Calculated Field
Hi All,
I have a disconnected recordset(batchupdate) which contains a calculated field. I have bound the recordset to a datagrid. If I add new records, the calculated fields are appearing only after executing the method UpdateBatch. Is there a way to disply the calculted fields immediatly after adding new records?

Regards
Sabish

How To Calculate And Display A Calculated Field
I am looking to find out how to calculate and display a calculated field in the report footer of a data report. The result is calculated from two sum functions that are found in the report footer.
thanks.

Can You Add Data To A Calculated Field In A Recordset In SQL Server?
VB6.0
SQL Server2000

Hi,

I am trying to add data to a calculated field in a disconnected recordset and i am getting the following error:

"Multiple-step operation generated errors. Check each status value."

Here is the query for the recordset:

SELECT table1.amount_charged, table1.deductible, CAST((amount_charged - deductible) as Numeric) as balance
FROM table1
WHERE table1.code = '0001'

Here is the VB code that is giving the error (falling over on the second line):

rsTables1.addnew
rsTable1.fields("balance").value = 0

I am using MDAC2.8 and my provider is OLEDB.1

We are converting our oracle database into SQL Server and in oracle you can add data into a caluclated field as shown above.

My question is does anybody know if this is allowed in SQL Server or am i dealing with a configuration problem, maybe I need to use a different provider?

Any help greatly appreciated!

Return A Value From A Calculated Control To A Field In A Table
I need some help trying to return a value from a calculated control to a field in a table.
This is for an Access project where they have members(customers) who use points(instead of currency) for prizes. I need to calculate how many points they have, how many they used and how many they have left, which I have in calculated fields, but now I need to keep them in a table.
Any ideas?

Select Max And Min From A Calculated Field With #Error (SOLVED!)
I'm having a problem with the following query. It works well when the field has a value and not #Error (the field is calculated in an Access DB, if the source data for the calculation is missing the record in the field serv is = to #Error )

What I want to do is find the Max and Min value in the field, if there is a record = to #Error skip and not consider or worse case, catch the #Error BEFORE the query or during the query to avoid the error and error message and Exit the sub.

The error message I'm getting is: The SELECT statement includes a reserved word or an argument name that is misspelled or missing or the punctuation is incorrect.

here is the code:

Code:

Option Explicit

Public servmaxl As Currency
Public servminl As Currency

Public Sub MinMaxS()
    
Dim rs As ADODB.Recordset
   Set rs = New ADODB.Recordset
    With rs
    .Open ("SELECT Max(serv) as [maxserv] WHERE serv <= 0 ,Min(serv)as [minserv] WHERE serv <= 0 FROM Trendscalc"), cn, adOpenKeyset, adLockPessimistic
    ' Populate the Recordset.
    
    ' rs.MoveLast
    servmaxl = rs![maxserv]
    servminl = rs![minserv]
    
    'rs.Close
    End With
End Sub



Thanks for any and all help

_________________________________________________________________

Edited by - vbprog1144 on 4/7/2005 6:38:33 PM

Calculated Field Isn't Updated Dynamically In Datagrid
Hi,

I have created a command that is based on a query that uses a calculated field of the form:

SELECT field1, field2, field3, `field1`+`field2`+`field3` as marking
FROM table;

field1 to field3 are numeric.
I right drag & drop this on a form and create a datagrid. I change the value of a field (e.g. field1) but the marking field isn't updated as it should even when I click on a different row (AddNew, AddUpdate etc. is allowed in the datagrid and the command has lock type optimistic) . However, if I close and reopen the form, the marking field has been updated which is inconvenient for my application though.

Is this one of the common problems with updated of ADODB?

Any solutions?

Thanks in advance.

John.

Excel: Pivot Table&gt;Calculated Field
Can I define a calculated field based on a string "Field" and put it in the Rows area for grouping purposes as follows:

L_Name (String type field):
S_Name (Calculated field) = left(L_Name, 3)

or is there any other way to get around this situation?

Thanx
Fatih

Selecting Values In A DataCombo Linked To A Calculated Field In The Recordset
Hi all,

Please help me with this one:

When I try to choose an entry in a DataCombo I get the following message: "Field not updatable, Bound Property Name: boundText, FieldName: UserName"

These are the commands that fill the DataCombo:

strcriteria = "SELECT Officers_Functional.Worker_Number, [General_Users].[First_Name] & chr$(32) & [General_Users].[Middle_Name] & chr$(32) & [General_Users].[Family_Name] AS UserName FROM General_Users INNER JOIN Officers_Functional ON General_Users.Worker_Number = Officers_Functional.Worker_Number WHERE (((Officers_Functional.Ordinal_Projects)=" & iProject & "))"

rsUsers.Open strcriteria, adoConn, 1, 3

With DCmbCurrentOwner
Set .DataSource = rsUsers
Set .RowSource = rsUsers
.ListField = "UserName"
.DataField = "UserName"
.BoundColumn = "Worker_Number"
.BoundText = ""
End With

As you see, the field UserName is a "calculated" field.
Other DataCombos in the program that are filled without "calculated" fields, work fine.

What is the reason for this annoying message and how can it be avoided?

Selecting Values In A DataCombo Connected To A Calculated Field In The Recordset
Hi all,

Please help me with this one:

When I try to choose an entry in a DataCombo I get the following message: "Field not updatable, Bound Property Name: boundText, FieldName: UserName"

These are the commands that fill the DataCombo:
strcriteria = "SELECT Officers_Functional.Worker_Number, [General_Users].[First_Name] & chr$(32) & [General_Users].[Middle_Name] & chr$(32) & [General_Users].[Family_Name] AS UserName FROM General_Users INNER JOIN Officers_Functional ON General_Users.Worker_Number = Officers_Functional.Worker_Number WHERE (((Officers_Functional.Ordinal_Projects)=" & iProject & "))"
rsUsers.Open strcriteria, adoConn, 1, 3
With DCmbCurrentOwner
Set .DataSource = rsUsers
Set .RowSource = rsUsers
.ListField = "UserName"
.DataField = "UserName"
.BoundColumn = "Worker_Number"
.BoundText = ""
End With

As you see, the field UserName is a "calculated" field.
Other DataCombos in the program that are filled without "calculated" fields, work fine.

What is the reason for this annoying message and how can it be avoided?

How To Generate Checkboxes From Runtime And Caption = ADO Access Table Field
hi,

can someone tell me, how it´s possible to generate Checkboxes from Runtime dynamically when they depend on the number of various fields and its content ??
For every table field one checkbox with caption of the field content. The table fields can change.

Calculated Textbox In Detail Section Of An Access Bound Form?
Hi all,

Is it possible to have a text box on a MS Access data bound form which is not bound to a table field?
Specifically, I need to put a text box in a detail section of a form and fill it in code as the form displays each record. The information would be based on the data in the current record.
I could not figure out what event would trigger the code that fills the textbox or how to refer to a particular record in the detail section of a form.

Thanx in advance for any replies ,
Jaroslaw

How To Modify MDB Field Length And ACCESS Field Value Limits Using ADO VB6 Coding.
Hi.

How to modify MDB field length and ACCESS field value limits using ADO VB6 coding.

Where to find an example?

Access Select Qry - Join Number Field To Text Field
Hey

I have a select query with 2 tables which I want to inner join table1 field1 data type is number with table2 field1 data type text.

I've tried CInt(table2.field1) in SQL but doesn't like this:

SELECT table1.field1, table2.field1,
FROM table1 LEFT JOIN table2 ON table1.field1 = CInt([table2].[field1])


Any ideas folks?

Cheers,
Mudz

Call The Memo Field In Access From Text Field In VB????
Hello
I am running a SQL query in VB to search for anything in the [comments] field defined as Memo in Access database (not text field).

When I run search, I got the error "type mismatch"....

Here is the code:

"WHERE (([DAILY WORK].[Comments]) like ' * " & [txtCommentSearch.Text] & "* ')" & _

(The above code all in one line)


I tried [txtCommentSearch.Memo] but still not working. The txtCommentSearch is the field in VB that I want users to enter any keywords to search.

Can anyone help me, please? Is the wildcard right in VB statement?
I tried to define [txtCommentSearch.text] as variant but still not work. What I done wrong?

Thanks.
Bill

Count Field Incorrect Error/ Access 2K ? In Field Name
I have an Access 2K database with a field named [Shipped?]

When I try to do the following.

rs.open "Select * from [FO#/Main] Where [Shipped?] = False

I get the following error.

[Microsoft][ODBC Microsoft Access Driver] Count field incorecct

I assume it has something to do with the question mark.

I do not want to change the name of this field. That would require a lot of rewriting of code and editing many forms in the Access program.

Is there around this error?

I have not found anything in the MS knowledge base to help me with this.

Someone please help me.

Thanks

Write A VB Field Entry To An Access Table Field
I have a field called lstQuotedQty on my VB form of which I would like the data input by the user into it to go into a field in an Access table called tblStock and the 3rd field in the table called fldSold...

The code seems to run fine, looks at my A: as though searching for the Access Database, but when I look at the Stock table of course nothing new populates the fldSold as I hoped. This is my code: Also note the user may populate the lstQuotedQty with anywhere from 1-to-an infinite number of different items sold.
I only have fldProductNo, fldPrice, fldAmount, fldSold in my tblStock, and fldSold is the only one I want to populate with this data, I'm not sure how large a zip file we are allowed to upload, but will try to attach the whole thing...I am still in the baby stages here, and everything is pointing to the A: if anyone tests this or has opinions to share I'd appreciate it...

Private Sub Add_Item2_Click()

'==================================
Dim adoDSN As ADODB.Connection
Dim strSQL As String
Dim strConString As String
Dim i%

    strConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" _
                    & App.Path & "Inventory.mdb" & ";Persist Security Info=False"
    Set adoDSN = New ADODB.Connection
    adoDSN.Open strConString
    For i = 0 To lstQuotedQty.ListCount - 2
        strSQL = "Insert Into tblStock (fldSold)"
        adoDSN.Execute strSQL
    Next i
    adoDSN.Close
    Set adoDSN = Nothing

End Sub

Populating An Access Table Field With Output From VB Field
I have a field called lstQuotedQty on my VB form of which I would like the data input by the user into it to go into a field in an Access table called tblStock and the 3rd field in the table called fldSold...

The code seems to run fine, looks at my A: as though searching for the Access Database, but when I look at the Stock table of course nothing new populates the fldSold as I hoped. This is my code: Also note the user may populate the lstQuotedQty with anywhere from 1-to-an infinite number of different items sold.
I only have fldProductNo, fldPrice, fldAmount, fldSold in my tblStock, and fldSold is the only one I want to populate with this data, I'm not sure how large a zip file we are allowed to upload, but will try to attach the whole thing...I am still in the baby stages here, and everything is pointing to the A: if anyone tests this or has opinions to share I'd appreciate it...

Private Sub Add_Item2_Click()

'==================================
Dim adoDSN As ADODB.Connection
Dim strSQL As String
Dim strConString As String
Dim i%

    strConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" _
                    & App.Path & "Inventory.mdb" & ";Persist Security Info=False"
    Set adoDSN = New ADODB.Connection
    adoDSN.Open strConString
    For i = 0 To lstQuotedQty.ListCount - 2
        strSQL = "Insert Into tblStock (fldSold)"
        adoDSN.Execute strSQL
    Next i
    adoDSN.Close
    Set adoDSN = Nothing

End Sub

Fill A Dbf Or Access Table Field With A Recordset Field
Hello,
I need to fill out a dbf field with values from a recordset I get through a query.
The target dbf has a "variable" field which have to be filled with values from a recordset.
Any help will be appreciated.
Hayk

How Can I Use ADO To Add A Jpg (C:1.jpg) To A Jet Field At Runtime?
Thanks in advance for any answers!

How can I use ADO to add a jpg (C:1.jpg) to a jet field at runtime? Below I defined the data type of the "Image_Field" to an Ole Object. It didn't work. I'm sure I'm so far from doing this right it isn't funny!


Set cn1 = New ADODB.Connection
cn1.ConnectionString = "DSN=P42;"
cn1.Open
Dim rs1 As ADODB.Recordset
Set rs1 = New ADODB.Recordset
rs1.LockType = adLockOptimistic
rs1.CursorType = adOpenKeyset

rs1.Source = "select * from tblPatients"
Set rs1.ActiveConnection = cn1
rs1.Open
rs1.addnew
rs1.fields("Image_Field") = "C:1.jpg"
rs1.update


Thanks!

ddutke

Field Type... Get Avg() ...of An Access Text Field
i have an access DB that has a text column of "integers" how can i use the avg function or average them with out individually convertiong the values??? any ideas

Trying To Add A Field In A Database At Runtime
This is a project written in VB6 using DAO (jet).

Here is the code:

xs = ""
On Error Resume Next
xs = db.TableDefs("mMisc").Fields("webPassword").Name
On Error GoTo 0
If xs <> "webPassword" Then
db.TableDefs("mMisc").Fields.Append _
db.TableDefs("mMisc").CreateField("webPassword", dbText, 25)
dbp.TableDefs("mMisc").Fields("webPassword").AllowZ eroLength = True
db.TableDefs("mMisc").Fields("webPassword").Default Value = ""
db.Execute "UPDATE mMisc SET webPassword=''", dbFailOnError
End If

xs = ""
On Error Resume Next

It gives me a runtime error "424" on the statement:
dbp.TableDefs("mMisc").Fields("webPassword").AllowZ eroLength = True
and tells me "Object Required"

Can someone see what is wrong please. Thanks.

Set Field Size At Runtime
How do I set the size of a field at runtime?

I've tryed the following...

----

dim db as database
set db=OpenDatabase("somedb.mdb")
db.TableDefs("sometable").Fields("somefield").size = 90




(this returns Error 3219, Invalid Operation)


db.Execute "ALTER TABLE sometable ALTER COLUMN somecolumn text(90)"




or


db.Execute "ALTER TABLE sometable ALTER COLUMN somecolumn c(90)"




(this returns syntax error in ALTER TABLE statement)

how can I do this from VB?? it can be easily done from Access...

Thanks in advance

DataReport Field Manipulation At Runtime
I have a text date field in the Access database table (using the MS Jet 4.0 OLE DB Provider in the DataEnvironment) which is in the form dd/yy/mm. I want to have this date copied into a variable numeric date field in the form yymmdd and sort my DataReport in this order, I have looked at the queries and FAQ’s. The one on making a 2 column report gives an example of concatenating two fields, but what I want to do is split up a field into sub fields and then concatenate. Is this possible at runtime?

ADOX To Create A Field At Runtime!
How can I use ADOX to create jet fields at runtime? Below is the opening of the connection and the recordset creation using ADO. Would it be possible to show how to do the same thing using ADOX and then to create a field named "TestField" to the "tblPatients" table? Also, what is the name of the reference to ADOX?

Thanks!

ddutke

Set cn1 = New ADODB.Connection
cn1.ConnectionString = "DSN=P42;"
cn1.Open
Dim rs1 As ADODB.Recordset
Set rs1 = New ADODB.Recordset
rs1.LockType = adLockOptimistic
rs1.CursorType = adOpenKeyset

rs1.Source = "select * from tblPatients"
Set rs1.ActiveConnection = cn1
rs1.Open

Modifying Field Alignment At Runtime ...
Hi all!

I'm using CR.NET.

In function of data to show and some visual aspects, some of the report data fields have to be alignment at right or at letf.

Does anyone know how to change the data field alignment property at runtime ?

I can get the field object, but I didn't find the right property to change the alignment.

Thanks a lot in advance.

Lázaro.

Reference To Field In Recordset In Runtime
Hi,
I reference to field in recordset: "rs!ID". ID is field name. I want to set field name in runtime. ID can change to "Name", "Add" . . .etc
How can I do it?
Thank,

Database Allowing New Field Creation In Runtime
I am a new user to VB and I was wondering if somebody would be able to let me know if there is a way to create a database within vb (I can do this already) that allows for new fields to be added during runtime (this is where I need help) and that also updates combo list boxes that look up these fields in other forms in this program? Thanks.

Passing Formula Field Values At Runtime
I am using Crystal Report 8.5 & VB6.

I designed a report with a sub report. I am able to pass formula field values to main report but failed to pass to sub report. I am using formule field values to set my report header. Following is code for main report which is working nice for main report

Code:
Report.FormulaFields.GetItemByName("d" & Trim(Str(rsMonthTransaction.Fields("reportseq")))).Text = "'" & rsMonthTransaction.Fields("payheadname") & "'"


I need how do I perform this.

Thanks

Hyperlink From A Cross-tab Field Does Not Work At Runtime
Hello,

Could anyone tell me why the hyperlink from a cross-tab field does not work at runtime. I encounterd this problem in both CR 8.0 and CR 8.5 releases.

Best regards,
Florin

Modify Field Values In Crystal Report At Runtime
hi,

I have this simple question. I have a report in the designer section of my ide with fields that match fields in my db. How can I instead of showing the actual values in the db for certain fileds, modify them before display by passing these values in a function then display the results?

Any help anyone? Thanks very much.

Fixing The Decimal Place Of Numeric Field At Runtime
Dear all,


I have to change the decimal places of a database field at runtime.

How can i use functions to write a script under format area.

I am using Crystal Reports 8.5 with VB 6 and SQL Server 2000


Thanks in Advance

Sam Alex

Adding Images To ImageList At Runtime (Source: SQL Image Field)
SQL 2000
VB6 (sp6)
I have a table that holds an image and its description
"Text" and "Image" types

I will most likly BIND the image field to am IMAGE control for the user to see the image.
How would I populate the ImageList at runtime?

Dim li as ListImage
Set li = ImageList1.ListImages.Add(, "pic", LoadPicture(BoundImageControl.Picture)) will this work?



Thom Boglino
CLC Education
Thom Boglino :)
The Computer Learning Center
727-847-6955
352-683-7255
email@removed
email@removed

*Copyright (c) confidential message. No redistribution.
This message is intended for the use of the addressee
only and may contain confidential or privileged information.
If you have received it in error please notify the sender
and destroy it. You may not use it or copy it to anyone else.

How Is Pi Calculated
can any 1 please tell me as to how the exact value of Pi
i.e. 3.1415926... can be calculated in VB

Get A Formula's Calculated Value
Hello every one, I have a question.
First a quick over view. I have several worksheets in a work book. each with costs for building a particular building. I then calculate the cost of each item ie. wood. per square foot, on the same sheet. Then I have a seperate sheet that calculates the averages of all the other sheets, via a micro Problem is I need to calculate the values of the formulas on the other sheets, not the formulas them selves. what whould I use to get this values. i.e. ActiveCell.Formula (have also tried R1C1 ect. still doesn't work, I get a type mismach error. for obvious reasons.) Any help would be great!
Thanks!
-Brandon

Copyright © 2005-08 www.BigResource.com, All rights reserved