i've been stuck on this problem all day.
how can i use a variable name to set several textboxes to readonly?
While MyDataReader.Read
if MyDataReader.Item("FieldType") Is System.DBNull.Value then
' do nothing
else
if MyDataReader.Item("FieldType") = "Hidden" then...
in vb i could use code like this to get the field name from a database table and then hide the textbox with the same name.
if rs("FieldName") = "hidden" then
me("txt" & rs("FieldName")).visible = false
end if
but in asp.net using vb.net i can figure it out. the code below gives the error...
you might try this link.
http://support.microsoft.com/default.aspx?scid=kb;en-us;872914
i had a problem importing a file, once it fixed the file i could import it and create the import spec. after i had the import spec i don't need to fix the file every time it's imported.
you could use the dlookup function and replace all your code with this:
FindSalesAdmin = DLookup("Initials", "tbl_SalesAdmin", _
"SalesNameFIELD = SalesAdminID")
or
change your select statement to have WHERE.
LSQL = "select Initials from tbl_SalesAdmin WHEERE SalesNameFIELD =...
you got me on the right track and i figured it out. i opened the word file and used "000" as the passwords since this is the incorrect password it gives error number 5408.
Dim oWRDA As Word.Application
Dim oWRDD As Word.Document
Dim wordFilePath As String...
thanks for the help.
i ran the code below and word asks for the password, if i enter the password i
get the message "Word file is not password protected!", if i click cancel to the
password box i get "Word file is password protected!".
if the file is modify password protected then i get...
has anyone else tried this code? i tried it and it tells me every word document is password protected.
is there something that needs to be changed or is there another way to check if a word document has is password protected?
if i type 1 in a cell it changes to 100. it's like it's formatted for percentage but doesn't show the % sign. i've formatted it to be number and general but it still displays 100.
does anyone know what would cause this?
thanks.
the easiest way to pass variables from 1 form to another is to created a module and add this code to it:
' ARRAY
Public varData(9) As Variant '0-9 for 10 fields
now you can reference this array from any where.
form1
varData(1) = "test1"
form2
text0 = varData(1)
you could assign a variable using DLookup:
quoteloc = DLookup("Location", "Users", "[UserNames] = '" & fWin2KUserName & "'")
or if it's a complicated query you could open a recordset and assign a value like this:
Dim db As Database, rs As Recordset, locked As Variant
Set db = CurrentDb()...
you could setup a scheduled task to run and use the /compact switch to compact the database.
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\Documents and Settings\DC57873\Desktop\Database.mdb" /compact
create a table called dbFilesize with a time/date field named Timestamp and a text field named Filesize.
create a new form, set the timer interval to 1000, add the code below to the on timer event:
Dim fs, f
Dim dbPath As String, dbName As String, dbPathName As String
Dim myTIME As...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.