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




Empty Field?


Hi

I have a Data Grid Control that is connected via ADODC to a Microsoft Access DB. I want the user to be able to add, modify, or delete records on the grid. This all works fine, except when the form opens up, the first field of the first record is blank with the cursor blinking there. For some reason it sticks the cursor there and erases what was previously in that field.

Does anyone know how to remedy this?

Thanks!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
SQL - Select All Records From Table Where Field Is Empty / Not Empty ?
I have a problem here in that I dont know how to execute this SQL query as I am not sure of the correct syntax...

I am trying to select all records from a recordset (populated by a table), where a particular field is empty...


So I guessed...

db.Execute("SELECT * FROM CUSTOMER ORDERBY CustomerID WHERE CustTelephone = "" ")


but its not working...


Similiarly, I need a query that returns all records where a certain field is filled, I have no idea how to do this one...


Guessed at...

db.Execute("SELECT * FROM CUSTOMER ORDERBY CustomerID WHERE CustOrder = "'(value)'" ")

(where '(value)' would mean any value at all)

funny enough its not working either


Can anyone please help ?


Thanks

SQL - Select All Records From Table Where Field Is Empty / Not Empty ?
I have a problem here in that I dont know how to execute this SQL query as I am not sure of the correct syntax...

I am trying to select all records from a recordset (populated by a table), where a particular field is empty...


So I guessed...

db.Execute("SELECT * FROM CUSTOMER ORDERBY CustomerID WHERE CustTelephone = "" ")


but its not working...


Similiarly, I need a query that returns all records where a certain field is filled, I have no idea how to do this one...


Guessed at...

db.Execute("SELECT * FROM CUSTOMER ORDERBY CustomerID WHERE CustOrder = "'(value)'" ")

(where '(value)' would mean any value at all)

funny enough its not working either


Can anyone please help ?


Thanks

Empty Field
What is the value of an empty field? I tried testing a recordset for empty fields like this...


Code:
if rsTabSearch.Fields("FileProperties") = "" then
'code here
end if
if rsTabSearch.Fields("FileProperties") = Null then
'code here
end if

but none are working... Any thoughts on this?

How To Tell A Field In A Recordset Is Empty
Ok I am implementing a database application. I am working with MaskEdBox this is how i have it working, one form comes up and the user types in the name they want to search for, then another form pops up with the matches in a listbox, then u click on the name u want and it jumps back to the orignal form, but the problem is i need to know how to tell in code if a particular field in recordset is empty. Like for instance
I am searching for Jimmy I find his name on the list and i click on his name, how can i tell before populating the form with his info if the recordset has nothing for his address or so on. Any help would be greatly appreciated

here is what i have

If rs!Workphone = "" Then
mskphone.Mask = mskphone.Format
Else
mskphone.Text = rs!Workphone
End If

How To Figure Out The Empty Field?
I have following code to read one text filed(atafromemail.txt), and change the pattern to another text file(SwitchPattern.tex). finally, convert to excel
datafroEmail.txt:
Total Amount: $8.95 USD
Currency: U.S. Dollars
Transaction ID: 32238683KU050193G
Item Number: 30524117856
Buyer: Betsi Coleman
Buyer's User ID: betsitwo
Message: bla ...
betsitwo's CONFIRMED Address: 1234 St.
.
.

SwitchPattern.txt:

"$8.95 USD","U.S. Dollars","32238683KU050193G","30524117856","Betsi Coleman","betsitwo", "bla ...", "1234 St."

My problem is sometimes data from email no the Message line at all.
This will cost problem in switchPattern file like the address line will move foward to Message field and so on. If there were more than one record, the whole thing will mess up. Anybody help?
<vbt>
Private Sub TextSwitch()
Dim txtAmount, txtCurr, txtTranID, _
txtNum, txtBuyer, txtUserID, txtmessage, txtAddress, xR As String
Dim i, j
Open App.Path & "SwitchPattern.txt" For Output As #1

Open App.Path & "DataFromEmail.txt" For Input Access Read As #6

Do While Not EOF(6)
Line Input #6, xR 'Read a line
If Left(LTrim(xR), 14) = "Total Amount: " Then
txtAmount = Right(xR, Len(xR) - 14)
Write #1, txtAmount,
End If

If Left(LTrim(xR), 10) = "Currency: " Then
txtCurr = Right(xR, Len(xR) - 10)
Write #1, txtCurr,
End If

If Left(LTrim(xR), 16) = "Transaction ID: " Then
txtTranID = Right(xR, Len(xR) - 16)
Write #1, txtTranID,
End If

If Left(LTrim(xR), 13) = "Item Number: " Then
txtNum = Right(xR, Len(xR) - 13)
Write #1, txtNum,
End If

If Left(LTrim(xR), 7) = "Buyer: " Then
txtBuyer = Right(xR, Len(xR) - 7)
Write #1, txtBuyer,
End If

If Left(LTrim(xR), 17) = "Buyer's User ID: " Then
txtUserID = Right(xR, Len(xR) - 17)
Write #1, txtUserID,
End If

If Left(LTrim(xR), 9) = "Message: " Then
txtmessage = Right(xR, Len(xR) - 9)
Write #1, txtmessage,
End If

j = InStr(1, xR, ":", 1)
i = InStr(1, xR, "CONFIRMED Address:", 1)
If i <> 0 Then
If Mid(LTrim(xR), i, 18) = "CONFIRMED Address:" Then
txtAddress = Right(xR, Len(xR) - j)
Write #1, txtAddress
End If
End If

Loop
Close #6 'Close
Close #1

End Sub</vbt>


Thank you!

Fang

Filter For Empty Field In ADO
I want to filter a Recordset for two cases of a date field: either empty or not.

On other fields, I am using:
rs.Filter = "FieldName = Whatever" which works fine.

How do I specify FieldName = "" or Fieldname <> ""?

As you can probably tell, I am new at this :-)

Thanks!

How To Look For An Empty Or Null Field ?
Hi,

I´d like to:
Connection.execute ("SELECT * FROM TABLE WHERE blabla = Null ").

Why doesn´t it work ?? It´s a DateField.

Any ideas ??

How To Proof If A Field Is Empty ??
Hellllooo,

i want to proof if a table field is empty. I tried this :

If !State = "" Then
Text3(2).Text = "No Content !"
Else
Text3(2).Text = !State
End If

Does anybody know a working solution ??
Mine causes error: illegal use of null. Means that !State is empty and Text3(2).Text doesn´t like empty fields or content.

Please help. Thanks

Problem With Empty Field ..
Im trying to update a table in my database.. and im using ".Find" to locate the column to be updated..

but it must only update if txt_name = fld_name and lbl_date = fld_date and fld_time_out is empty ..

my problem is , the fld_time_out = ' " + empty + "'" doesnt work..

any ideas or alternative i can use ? .. thanks..


please check my code:


Adodc1.Recordset.Find "fld_name = '" + txt_name.Text + "'"
Adodc1.Recordset.Find " fld_date = '" + lbl_date.Caption + "'"
Adodc1.Recordset.Find " fld_time_out = '" + empty + "' "

If Adodc1.Recordset.EOF Then
MsgBox ("..")
Else

With Adodc1.Recordset
.Fields!Fld_time_out = lbl_time
.Update

End With

MsgBox ("record saved")

Adodc1.Refresh

End If

Updating An Empty Field
Im trying to update all my fields in Access where the fld claimnumber is blank

Set mrstDWCActivityLog = GdbDWC.OpenRecordset("tblactivitylog")
GdbDWC.Execute "UPDATE tblactivitylog " & _
"SET fldClaimNumber='" & dbcClaimNumber.BoundText & "' " & _
"WHERE fldClaimNumber='" & "" & "'"

Im Just not sure how to find an empty field.
can anyone help

Refering To An Empty Field?
I can't figure this one out, how would you refer to an empty field in the database? Closest I can come with is something like:


Code:
If datLeague.Recordset!Name="" then
Something along those lines... except databases obviously can't be refered to as "".

What's the code you need to make this reference?

Select Where Field Is Empty ?
Hi everyone ...
Using VB6, Access2000 and ADO, I need to do what should be a simple select statement.
In plain english I need to Select everyting from table1 where field3 is NOT empty.
The field data type is Text.
When I use the SQL below, I get a syntax error.
Here is the SQL ... any help?

Code:
strSQL = "Select * From Table1 Where Field3 <> """

SQL For Access - Where Field Is/is Not EMPTY
How can I query where a field is either empty or not empty?

I would normally do...


VB Code:
recordset.Source = "SELECT * FROM table WHERE [FIELD] = 'xyz';"


but obviously in this case i want to do it so it'll bring back the records if the field is zero length and another for if it is not zero length. Anyone know how to do this?

thanks.

How To Test A Field Is Empty?
Hi there,

Could someone tell me how to test a field is empty or not? Thanks

K

How Do I Evaluate An EMPTY RS Field?
I have a SELECT that brings back records but sometimes one of the Fields in the RS will be empty. So, whenever I use the code below on an empty RS field value I get the error, "can not be found in the ordinal", message. How can I just check if the RS field value has something in it?


Code:
if len(rs("ResponseTest")) = 0 then



thanks

Populate Empty Field
Using code- Is there anyway to enter a value into an empty field in a recordset? Maybe by using an If...Then statement???

Thanks for help
paul

Characterization Field Empty
This probably isn't the correct forum, but I'm a VB guy so....

I'm using the Indexing Service for searching through the contents of PDF documents.  A couple of the fields I want to get data from, Characterization and DocSubject, are returned as Null.  I set the cached = true for these properties, made sure the Generate Abstracts was set to True for the Indexing Service (catalog inherits this value), restarted the service, and initiated a full rescan of all directories of the catalog.

According to articles I've read I understand it may take some time before the word lists are updated, but it's been several hours and I only have a small amount of test documents in the directories (about 30 files, most are about 50KB, the biggest is about 500KB).

I did find one web article that mentioned a GenerateCharacterization attribute in the Registry that should be set to 1.  Of the three attributes I found in the Registry with that name, one was set to zero.  So I set that to 1, but it didn't make a differnce.

Here's a sample of my code:
CODE    Dim rs As ADODB.Recordset
    Dim strConn As String
    Dim strSearch As String
    
    On Error GoTo ErrHandler
    
    Set rs = New ADODB.Recordset
    strConn = "Provider=MSIDXS;Data Source=MyCatalogName"

    strSearch = "SELECT Size, DocTitle, DocSubject, FileName, Characterization from SCOPE()"

    rs.Open strSearch, strConn

    'rs("Characterization") and rs("DocSubject")
    'are both Null!

Data Field (Empty) Not Found
I am trying to create a limited dynamic data report - I scan the field names in from the recordset and then fill the text controls - data field properties with the names scanned in etc.

Unfortunatelly some times there are not enough field names to fill all the text controls and so I get the data field (empty) not found message.

Does anyone know how to assign a null value to a data field, or some way round it ??

On error resume next does not work

Cheers
Paul

Saving A Empty Textbox To A Db Field
im getting the zero-length string error, this isn't a problem when im saving a new record, i just dont update those fields that are blank,, but when im trying to edit a field i need to remove the old data and replace it with the new data... even if the new data is "".... how can i take an empty string and save it to a field?

Data Field (Empty) Not Found
I am trying to create a limited dynamic data report - I scan the field names in from the recordset and then fill the text controls - data field properties with the names scanned in etc.

Unfortunatelly some times there are not enough field names to fill all the text controls and so I get the data field (empty) not found message.

Does anyone know how to assign a null value to a data field, or some way round it ??

On error resume next does not work

Cheers
Paul

Empty Field Causing A Problem
Just as one problem gets sorted up crops another

I've got a small database with 4 records in it (see attachment) but on the fourth record the person didn't have a company name so I left the field blank

I expect to have many records with blank fields in them but my program doesn't like them being blank and comes up with some 'invalid use of null' error

Instead of running through and putting the data into the textboxes for each record and just that record I think its trying to put into each textbox the data that comes next in the database - if that makes sense

Any Advise?

How To Check An Empty Field On A Form?
Here's the code I have for a text field on my form.

If Len(.Text1(5).Text) > 0 Then
If Not IsDate(.Text1(5).Text) Then
MsgBox "The received date must be a valid date."
Exit Sub
End If
End If

I always gives me the msgbox error even when I don't put anything in that field. I can't figure out why. The field's default text is empty, so I don't understand how it's getting inside that first if statement. Anyone have an idea or a better way to do this? thanks.

Data Report - Empty Field
I created a data report with ADO and the record set is prepared on the fly. Some of the columns in the record set will be empty. But the data report does not allow me to have empty fields. How do I have it ?

Thanks in advance

James

Return An Empty String From A Ado Field Containing A Null Value
Is there a way to return an empty string from a null ado field in Visual Basic 6? I use nz() in Access, looking for a similiar method.

Recordset Field Value Empty When Using CursorLocation = AdUseServer
Greetings!

Here's my problem:

I have a recordset that ABSOLUTELY needs to have server side cursor.
If I do something like:

Code:
Dim oConn as ADODB.Connection
Dim oRs as ADODB.Recordset
Dim sSql as String
Dim sValue as String

sSql = "SELECT * FROM Item WHERE pkIdItem = 1"

Set oConn = New ADODB.Connection
oConn.CursorLocation = adUseServer
Set oRs = oConn.Execute(SQL)
While Not oRs.EOF
sValue = oRs("The75thField")
'// Here, I grab all the 75 fields from the recordset, or do whatever I need
'// to do with the values.
Wend
Set oRs = Nothing
Set oConn = Nothing
I have lots of fields that are "Empty" (not null or "").

Does anybody have any idea how to fix this problem? This particular behavior always happens when I am using tables that have lots of fields inside. Usually, I just fix it by setting the Cursor Location to "adUseClient", but for a reason of "memory managing" and speed of my application (kind of...), I absolutely need to use a server side cursor.

Thanks in advance!

Validate The Empty Field Based On Tab Index
Code:


How can i validate the empty field based on tab index ?? The following code only can found out the empty field randomly.


Public Function ValidateEmptyField(formName As Form) As Boolean
ValidateEmptyField = False
Dim ctrl As Control
For Each ctrl In formName.Controls
If TypeOf ctrl Is TextBox Or TypeOf ctrl Is ComboBox Or TypeOf ctrl Is RichTextBox Or TypeOf ctrl Is ImageCombo Then
If Not ctrl.Visible = False Then
If ctrl.Text = vbNullString Then
MsgBox "Please Fill up the " & ctrl.Tag, vbCritical, "Save Failed"
If ctrl.Enabled = True Then
ctrl.SetFocus
End If
ValidateEmptyField = True
Exit Function
End If
End If
End If
Next

End Function


Thanks for any reply !!!

Empty Date Field Entry Problem
I have several text boxes in a VB6 entry form that take short dates and saves them to an Access 2002 db. If they all get filled the save works fine. If any one is left empty I get the following error message: Syntax error in date in query expression '##'.

The code used to Enter and Save them is:


VB Code:
Con.Execute "INSERT INTO Contract (Date_Filed [and 17 other fields]) VALUES (#" & TxtDate_Filed.Text & "#, [and 17 other field values])"


I have read about a "Null" problem but don't know if this is an instance of that since I don't get the "Invalid Use of NULL (94)" error message. Any help appreciated. --Ed

How To Insert Empty String In Numeric Field?
Hi,

I'm connecting to a database via ADO. The table contains several fields that are of the Number data type.

If I go in the table itself, I can clear out the values in these fields but how can this be done in VB?

I try and use the following peices of code witout any luck:

oRs!Field1 = ""

oRs!Field1 = vbNull

oRs!Field1 = vbNullString

It keeps returning the type mismatch error. Please keep in mind that I do not want to put 0 into the field, I want to make them blank, or null. This works if the field is a Text type, but not with Numeric type.

Any help or examples would be greatly appreciated..

Dan

Showing Datareport Empty Field Borders
I have a datareport that works perfectly in every way, except that my empty fields do not show borders. I have some fields that get their data from a database, which work fine. The problem is the empty fields, which need to show just empty cells, but instead have no border and are just empty space. (The user will print out the form and fill in these last parts by hand, so I need to make the form idiot resistant and clearly show the spaces to write in. The borders for all the fields are set as "1-rtBSSolid". The empty fields are labels. Any help is appreciated

(btw, I posted this to another forum and have gotten no help, so I'm hoping DevShed will come through for me )

How To Display Filled And Empty Field At A Time
hi all,

a) I want to display the value of fields in which some of have data and some are empty from an access file.
b) I am using login ID and Password for the user in my project but I want to know being an administrator who and when is logging in.

pl. help me

surnasiv

How To Still Show Query Results When 1 Field Is Empty?
I've installed MSDE SQL Database and put a database in it by importing an access database into it.
It is a relational database. I've written a sql statement that uses INNER JOIN to get data from a table and display it.
The problem is that every record that has even one empty field does not show up in the results.

Example... in the example below all records have a Stocknumber yet if a record doesnt have anything in the "model" field it wont display the record at all. It Will display all records that have All fields filled.

How can I make the records still show even if one field is empty?

Thanks for any info.

Code:
'my SQL statement

SELECT dbo.VehicleMaster.StockNumber
FROM dbo.VehicleMake
INNER JOIN dbo.VehicleMaster ON dbo.VehicleMake.VehicleMakeID = dbo.VehicleMaster.Make
INNER JOIN dbo.VehicleModel ON dbo.VehicleMaster.Model = dbo.VehicleModel.VehicleModelID





Edited by - Matrix1000 on 2/29/2004 9:29:46 PM

How To Show Fields By Relation When The Field Can Be Empty
Hi all,

in my uploaded file you can see a part of my ERD. I also uploaded the TSQL for easily recreating the tables.
I want to have a dataset containing:
Role,Page, View(y/n), Insert(y/n),Update(y/n),Delete(y/n)
I found a close solution with following query:

SELECT dbo.PagePermission.IntranetRoleId, dbo.PagePermission.PageId, dbo.PagePermission.PermissionId AS V, PagePermission_1.PermissionId AS I, PagePermission_2.PermissionId AS U,
                      PagePermission_3.PermissionId AS D
FROM dbo.PagePermission FULL OUTER JOIN
                      dbo.PagePermission PagePermission_3 ON dbo.PagePermission.IntranetRoleId = PagePermission_3.IntranetRoleId FULL OUTER JOIN
                      dbo.PagePermission PagePermission_1 ON dbo.PagePermission.IntranetRoleId = PagePermission_1.IntranetRoleId FULL OUTER JOIN
                      dbo.Page ON dbo.PagePermission.PageId = dbo.Page.Id FULL OUTER JOIN
                      dbo.PagePermission PagePermission_2 ON dbo.PagePermission.IntranetRoleId = PagePermission_2.IntranetRoleId
WHERE (dbo.PagePermission.PermissionId = 1) AND (PagePermission_1.PermissionId = 2) AND (PagePermission_2.PermissionId = 3) AND (PagePermission_3.PermissionId = 4)
GROUP BY dbo.PagePermission.PageId, dbo.PagePermission.PermissionId, PagePermission_1.PermissionId, PagePermission_2.PermissionId,
                      PagePermission_3.PermissionId, dbo.Page.PageName, dbo.PagePermission.IntranetRoleId

yet when one of the permissions doesn't exist for a certain role in a certain page; the record is not shown at all. I'd like to see the Null's as well. What am I doing wrong?





Edited by - Sensytje on 1/26/2006 4:35:55 AM

Returning A Date/Time Field To Empty
I am accessing a database in the following manner:

set db = OpenDatabase("c:Databasename.mbd", false)
set rec = db.openrecordset("tblName",dbOpenDynaset)
rec.MoveFirst
Do Until rec.eof
With rec
.Field("date")=vbNull
.MoveNext
End With
Loop




It continues to fill the date with "12/31/1899"

I can't figure out how to just delete the information in the field so that it is empty.

Jason Hatt

Write To File Produces #NULL# From Empty Field
I am trying to write the contents of some of the fields of my form to a text file. For use with an other application.

I would like the results of empty fields to be written to the text file with just another comma. However the empty fields always get written to the text file as #NULL#

How can I get arounds this?

BTW I'm new to VB6

Much thanks in advance

Multiple-Step Operation Generated Errors When Setting Date Field To Empty Or Null
I have a form with a bunch of bound controls and a few are date fields. When I try to clear out a date that has been previously set in the record I get the Multiple-Step Operation Error -2147217887(8004e21) The database allows nulls for these date values, so it is OK at the DB level - looks like the ado is causing the problem.

DB is SQL Server 2000

I found the following on Microsoft's site that is directly related to my problem - looks like there is no workaround according to them.

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q247/2/02.asp&NoWebContent=1

Anyone else have any ideas? There is to much invested in using the bound controls at this point - I cannot abandon this method.

Sorting A Table In VBA To Delete Empty Rows And Shift Empty Columns
 Problem is:

1a. Have a table, it may vary with regards to RxC.
1b. The first column always contains a company name. The final column always contains a count (zero or a number > zero).
1c. Every other column either contains text or a zero.

2. I want to delete all the rows where the final column = zero
3. I then want to go through each column of each remaining row and where the cell is =0 delete the cell and 'shift cells left'

A table may help to show what i have:


CompanyNames Field1 Field2 etc.... FinalColumn
==================== ==== ==== ====
BusNameA, text1, 0, 0, text4 ... ... ... 2
BusNameB, 0,0,0,0 ... ... ... 0
            ... ... ...
BusNameE, 0, text2, 0, 0 ... ... ... 1


And I want the table to show


==========
BusNameA, text1, text4, 2
BusNameE, text2, 1

Gurus, kindly tell me how i may do this?

Steve

 

Urgent : Create An Empty Recordset And Validate A New Empty Array
Hi everyone,

I'm new in this kind of development.

I need to create an empty recordset, just to create an empty shell with a structure (not a data type). So, I'm trying to 1. Open it 2. Adding new row then with the addnew method.

Also, I need to validate a dynamic array before adding records to the recordset.

Thanks everyone.

Dealing With Empty Fields And Empty Search Critera
I'm creating a database where not all the fields will contain information. Specifically, I'm making a database of materials and their properties. Some properties don't apply to all materials or are difficult to find, so they are blank. For example, I've been unable to track down the electrical resisitivity of acrylic.

I've also set up a search dialog box and an SQL statement to search between user-entered values for all the different properties. I'd like the user to be able to search for all the properties at once (ex: search for a material with a yield strength between 20 and 30 AND a dielectric constant between 1 and 3 AND a density between 1.2 and 1.5, etc.) but still be able to search for the materials when the user enters no value in to the search dialog box. With what I've done so far, the user must enter critera for all fields for the query to return any records.

I tried the following code, but it isn't working. Sigh. Any ideas? (The error message is after the code.)

Code:
Private Sub btnSearch_Click()
Dim sqlMatlSearch As String
    sqlMatlSearch = "SELECT * FROM [tblMatlProps] WHERE"
    
    If (Not IsNull(Me.DensityLower)) And (Not IsNull(Me.DensityUpper)) Then
        sqlMatlSearch = sqlMatlSearch & "(Density Between " & Me.DensityLower & " AND " & Me.DensityUpper & ") AND "
    Else
        sqlMatlSearch = sqlMatlSearch & " Density > 0 "
    End If
    
    If (Not IsNull(Me.GlassTransitionTemperatureLower)) And (Not IsNull(Me.GlassTransitionTemperatureUpper)) Then
        sqlMatlSearch = sqlMatlSearch & "(GlassTransitionTemperature Between " & Me.GlassTransitionTemperatureLower & " AND " & Me.GlassTransitionTemperatureUpper & ") AND "
    Else
        sqlMatlSearch = sqlMatlSearch & " GlassTransitionTemperature > 0 "
    End If

    DoCmd.RunSQL (sqlMatlSearch)


This code produces this error: Run-time error 3075: Syntax error (missing operator) in query expression 'Density > 0 Glass Transition Temperature >0'.





Edited by - CcSteff on 7/20/2004 7:28:38 AM

Empty Line In Datagrid With An Empty Recordset
I've a datagrid of which I connect the datasource to my recordset. But when the result of this recordset is empty, I get an empty line in my datagrid. Then if I try to display a new recordset, I get the error :

"Either BOF or EOF is True, or the current record has been deleted; the operation requested by the application requires a current record."

So the system want to update my data, but the data doesn't exists.

Does somebody know how I can prevent getting an empty line with an empty recordset ?


Thanks!!!

Greetz,Joris

Empty Cells That Aren't Really Empty
I am using the code below to delete empty rows in a sparse spread sheet. This works fine for most of the worksheets but does not work on one. Even though all of the columns in a given row appear blank there seems to be something invisible in the cell that returns 11 items when the formula Application.CountA(Rows(r)) is evaluated. If I first select the row and apply "clear contents" then the macro below works on that row. If I set a watch point on the cell, I see a value of "..." (without the quotes). After I "clear contents" the "..." is gone. The "..." is never visiable on the spread sheet either in the cells or in the edit window. Does anyone know either
1. How I can detect these cells from the macro
2. How I can make sure the empty cells are really empty before running the macro.

Sub DeleteEmptyRows()
Dim LastRow As Long, r As Long
LastRow = ActiveSheet.UsedRange.Rows.Count
LastRow = LastRow + ActiveSheet.UsedRange.Row - 1
Application.ScreenUpdating = False
For r = LastRow To 1 Step -1
If Application.CountA(Rows(r)) = 0 Then Rows(r).Delete
Next r
End Sub

thanks,
Keni

Check Directory Empty Or Not,if Empty Delete The Directory-vb6
Hi,
How can i check in a drive how many folders are empty.
And i also want to know how can i delete the folders if the folders are empty.
Any idea please
Thanks

Advice Seeking On Error Port: Can't Change The Data Type Or Field Size Of This Field.
Can't change the data type or field size of this field. It is part of one or more relationships.

I need helps in solvin these probes.

Much thanks, Sinl

Need To Export SQL Data To XML File. 1 Field Is A BLOB (binary Field)
I'm a VB/SQL newb looking for some help on exporting records from the DB to an XML file. one of the challenges is that i have one field that is a Binary datatype (BOLB). i need to export that data out and convert it from its Binary state to readable text and save it to an XML file. Can some help me with this?


i will need to be able to specify how the XML file is laid so i can designate the tag names to be compatible with my web software.

Sample code, small projects...anything would be great.

Thanks
GK

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?

Concatenating Field Values Into One Field For An Update And Insert Query
Hello,

I have an ADO based DB viewer and I have a field where I need to concatenate values from 2 other fields in order to get teh right value. Now the concatenating part is easy, however I need to save this in my DB and and that is where the problem is.
I can concatenate the 2 fields and it shows in the textbox (txtFruit = apple, txtVeggie = corn, txt combo = txtFruit & txtVeggie = applecorn), but when I save it or update it, well it never saves. How would I go about doing this, thanks

Code:
"UPDATE Table SET Fruit = '" & DB_Table.txtFruit.Text & "', Veggie = '" & DB_Table.txtVeggie.Text & "', Combo = '" & DB_Table.txtfruit.Text & DB_Table.txtVeggie.Text & "'"
    




Edited by - jjoseph on 6/4/2007 10:18:40 PM

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

(solved)Can I Use (multiple Field With Bit Type Field Also) As Index On SQLServer
Hi

i have a problem with indexing on multiple fields, i have a table which has 3 field i want to use as an index(unique).
but one of the field type is bit(boolean), when i creating index in sqlserver the colomns doesn't show up..

please help.......
thank you so much.



Edited by - Esthrim on 10/6/2005 9:54:09 PM

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

Crystal Reports: Highlight Field Based On Value Of Other Field
Is this possible in Crystal Reports? I'd like to colour the values in {ado.NetWt} red where the value in {ado.LBound} > 0....a forecolor property or something?

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