[SOLVED]Strange Error = Access With VB Front End
Ekkkk I am getting a error below in my program, and i cant figure out what it is.
No Value given for one or more required parameters:
VB Code: Private Sub Command2_Click()Dim sSQL As String ' Used for holding the value of the SQL Strings ' SQL statement that connects the databaseIf rs.State = adStateOpen Then rs.ClosesSQL = "Select * FROM Main "sSQL = sSQL & "WHERE [FN] LIKE '%" & Text15.Text & "%' "sSQL = sSQL & "OR [LN] LIKE '%" & Text15.Text & "%' "sSQL = sSQL & "OR [ADDR1] LIKE '%" & Text15.Text & "%' "sSQL = sSQL & "OR [Addr 2] LIKE '%" & Text15.Text & "%' "sSQL = sSQL & "OR [CASE_Num] LIKE '%" & Text15.Text & "%' "sSQL = sSQL & "OR [ORDER_Num] LIKE '%" & Text15.Text & "%' "sSQL = sSQL & "OR [Zip] LIKE '%" & Text15.Text & "%' "sSQL = sSQL & "OR [LAMP_Num] LIKE '%" & Text15.Text & "%' "sSQL = sSQL & "ORDER BY [ID]" rs.Open sSQL, cn, adOpenForwardOnly, adLockOptimistic ' <--- DOSENT LIKE THIS ' Loop for the records that meet the above criteriaDim sLine As StringDo While Not rs.EOF sLine = rs.Fields.Item("ID") & vbTab & rs.Fields.Item("FN") & vbTab & rs.Fields.Item("LN") & vbTab & rs.Fields.Item("ADDR1").Value & vbTab & rs.Fields.Item("City").Value & vbTab & rs.Fields.Item("State").Value & vbTab & rs.Fields.Item("Zip").Value & vbTab & rs.Fields.Item("CASE_Num").Value & vbTab & rs.Fields.Item("Lamp_Num").Value & vbTab & rs.Fields("ORDER_Num").Value MSFlexGrid1.AddItem sLine rs.MoveNextLoopLabel39.Caption = "Search completed..."FillHeaders2End Sub
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Strange Error: SubScript Out Of Range [SOLVED]
Hi all,
I have an OS of W2k Professional and Access 2000 whereas my client has an OS of Win XP and Access 2000.
I made an application for him which uses a flexgrid to populate the data from the Access DB.
The problem starts here : At my end the application seems to run perfectly fine at our end but fails at the clients end.
I have tested the application on exactly the clients environment (Win XP and Access 2000.) machine. It works here too for me but fails at the clients Machine. he says he has tested it at 3 different machines and all seem to be throwing the same error
The Error is :
Code:
Date and Time: 6/28/2005 5:42:30 AM
Error Number: 9
Error Description: Subscript out of range
I know why a SubScript Out of Range error comes but the problem here is that it works on my Machines and fails at the clients .. any brilliant minds out here who can help me with this one.
*solved*How 2 Bring WebBrowser1 To The Front.
Hi I Right Clicked Webrowser1 to send to back to work easy can i put it to the front using code? or just right click it and bring it forward before compiling?
Cheers!
Edited by - Hopeless on 5/27/2004 11:22:31 AM
Strange Error When Saving A Record Via ADO To Ms Access
When saving away a blank textbox's contents to an ms Access db i get the following error message.
"Multistep operation generated error, Check each status"
I have checked the field type on the db and it is 'Text' and has the 'Allow Zero Length' property set to true and 'Required' set to flase.
This error seems to be intermitent
Please Help
Any solutions or ideas would be greatfully appreciated
Jamie
VERY URGENT...Strange Access Error/problem.
Ok the S H 1 T is hitting the fan with this one and I'm stumped.....
An access database has started playing up. So I tried to compact and repair it and got the following error ....
Quote:the MS Jet database engine stopped the process because you or another user are attempting to change the same data at the same time.
fair enough so I got everyone to log out the system and checked the open files on the server but there was no one....I am the only user.
to be on the safe side I copied the file to a local machine and checked I had full control and tried to compact and repair it again but the same error.
Any ideas??
Another database has started telling me it's read only whether this is related or not Im not sure but I havent investigated this fully.
----------------------------------------------------------------------------
Dan Bayley
Affordable website design UK
Free Google & Yahoo sitemap generator
Strange Memory Read Error In Access 2000
Hi guys,
Just a short one - I'm using Access 2000 with Windows 2000. I have a large database (with forms, modules, reports, macros and tables) which I have been working on.
I have just tried to compile it and have got this message:
"The instruction at "0x6503fc1c" referenced memory at "0x0035cd04". The memory could not be "read"."
It then gives the (rather useful?!?) option of debugging (which takes you to some assembly language!).
Any ideas what's going on? I've tried exporting all the Access objects (e.g. the forms etc...) to a blank project and starting again, but with no luck!
Thanks in advance for the help!
Steve.
Type Mismatch Error With Access DB / ADO - DAO [SOLVED]
I used this code in my project and everything goes well, but when I try the same code on an independant project with just one form I get a Type mismatch error, using the same Access DB.... I want to understand why I just can't believe this error is going to beat me!
Code:
Option Explicit
'This example uses Min and Max with an Access db to return the highest and lowest
' % values from a Table Field
Sub MinMaxX()
Dim Highlevel As Currency
Dim LowLevel As Currency
Dim pa As String
Dim db As Database
Dim rs As Recordset
pa = App.Path & "" & "test.mdb"
Set db = OpenDatabase(pa)
Set rs = db.OpenRecordset("SELECT Max(serv) As [Highlevel], Min(serve) As [LowLevel] FROM Trendscalc") <<<< ERROR
' Populate the Recordset
rs.MoveLast
Me.Text1 = Format(rs![Highlevel], "#00.00%")
Me.Text2 = Format(rs![LowLevel], "#00.00%")
db.Close
End Sub
Private Sub Command1_Click()
MinMaxX
End Sub
Thanks for any help
_________________________________________________________________
Edited by - vbprog1144 on 4/18/2004 11:36:03 AM
ListView ERROR With One Access 2002 DB And NOT With Another [SOLVED]
I'm getting the following error when I use this database DB1.mdb but not when I use this other database TEST.mdb both are Access 2002.
"Run-time error 2147352571 (80020005) Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record"
This is the code where I get the error:
Code:Public Sub GetLocalTables(LvTable As ListView)
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
Set rs = cn.OpenSchema(adSchemaTables, Array(Empty, Empty, Empty, "TABLE"))
Dim i As Long
LvTable.ListItems.Clear
LvTable.ColumnHeaders.Clear
LvTable.ColumnHeaders.Add , , "Tables", 2600
LvTable.ColumnHeaders.Add , , "Total Records", 1500
LvTable.ColumnHeaders.Add , , "Total Fields", 1500
LvTable.View = lvwReport
For i = 0 To rs.Fields.Count
LvTable.ListItems.Add , , rs!Table_Name, , 2 ' <<<<< This is where VB highlights the code
If Not i = 0 Then Load FrmMain.dbitem.Item(i)
FrmMain.dbitem.Item(i).Caption = rs!Table_Name
rs.MoveNext
Next i
rs.Close
Set rs = Nothing
End Sub
I'm attaching one database in this post, the one I'm having trouble with and the one that works well in the following post
vbprog1144
Edited by - vbprog1144 on 2/28/2004 5:50:13 AM
Strange Dir$ Result [Solved]
Help!
For some reason Dir$ is returning a random (appears) filename when called with an empty string. Can anyone else confirm this?
Debug.Print Dir$("")
On my system its returning a filename from my system, actually a file that exists in the path I've set for my Microsoft Visual Basic.lnk file? Multiple calls all return the same filename, so I'm guessing this isnt an enumeration, as there are two files in said path, and only one of them ever gets returned.
The only place I normally use this is a FileExists function, which I can check for an empty string, but this isnt normal is it?
It puts a bit of a damper on Len(Dir$(filename)) <> 0 as a way to check file existance.
Bit Strange And Hard To Think :S [Prob Solved]
i'd like to make a word generator using caps and uncaps
like if i have the word: qwe
the program should generate all possible combinations:
qwe
qwE
qWe
Qwe
QWe
qWE
QWE
qWe
QwE
And i don't think that i missed any combination.
this should read any word with less then 8 chars(cause it would be too long)
I hope this can be donne, it's getting me crazy
Solved: Strange Problem With UBound
ok
my problem:
when i uncomment the msgbox line it works fine but if i leave it commented out then it dosnt work....
have a look at the code for a better idea.
Code:Private Sub webExlude_DocumentComplete(ByVal pDisp As Object, URL As Variant)
'make sure its not blank
If URL = "" Then Exit Sub
' if the a stupid user presses back then change it back!
If URL = "http:///" Then
Call MakeExclude
Exit Sub
End If
' ok so it might not be a stupid user!
Dim SplitArray() As String
Dim SplitCount As Integer
SplitArray = Split(URL, "#")
SplitCount = UBound(SplitArray)
DoEvents
'msgbox splitcount
'IF YOU UNCOMMENT THE LINE ABOVE IT WORKS,OTHER WISE IT WONT
If SplitCount > 0 Then
MsgBox "pressed"
End If
End Sub
any ideas?
cheers
Edited by - 3D-Philly on 3/12/2007 3:05:05 AM
Strange Problem Storing A Date...[Semi-Solved]
Ok this is gonna be alittle difficult to explain... kinda hoping that someone may have been through this before.
I am writing an accounts payable system for my company and for some reason one of my dates randomly doesn't store correctly.
The variable is stored in a user defined type and it is being inputed by a dtpicker control.
Anyways the user types in all thier info and hits submit on the form... sometimes it works flawlessly and other time it will update my table with the previous value of the variable.
this is taken from where I add the value to the variable
VB Code:
With AP_Open_Rec .AP_Open_Vendor_No = UCase(txtVendor.Text) If AP_Transaction_Type <> "Change" Then .AP_Open_Voucher_No = 0 'blank for now End If .AP_Open_Voucher_Type = UCase(txtType.Text) .AP_Open_PO_No = UCase(txtPONo.Text) .AP_Open_Invoice_No = txtInvoiceNo.Text .AP_Open_Invoice_Date = Format$(dtInvDate.Value, "mm/dd/yyyy") .AP_Open_Due_Date = Format$(dtDueDate.Value, "mm/dd/yyyy") '<-- problem MsgBox .AP_Open_Due_Date .AP_Open_Discount_Date = Format$(dtDiscDate.Value, "mm/dd/yyyy") .AP_Open_Orig_Invoice_Amount = txtInvoiceAmount.Text .AP_Open_Orig_Discount_Amount = txtDiscAmount.Text .AP_Open_Invoice_Balance = txtInvoiceAmount.Text .AP_Open_Discount_Balance = 0 .AP_Open_Current_Partial_PMT = 0 .AP_Open_Current_Discount_AMT = 0 .AP_Open_Check_No = 0 .AP_Open_Check_Date = 0 .AP_Open_Main_Account_No = 30100 .AP_Open_Sub_Account_No = 0 .AP_Open_Selection_Status = 0 .AP_Open_Check_Print_Status = 0End With
I added the msgbox to try to catch where it isn't working... now randomly the message box will show a value that was last stored in the variable... completely ignoring what is being assiged to it...
anyone have a clue what is going on here?
Runtime Error 91. [Solved], ADO Global Connect [Not Solved]
I am sure this problem has to do with further lack of my knowledge of modules. But here is what is happening.
If you remember from my last post, I have a module now named Uconnect. Here is the code in thre:
VB Code:
Public Conn As ADODB.Connection Public Sub UserConnect()Set Conn = New ADODB.ConnectionConn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" _& "SERVER=192.168.0.10;" _& "DATABASE=testim;" _& "UID=" & Form1.txtUser.Text & ";" _& "PWD=" & Form1.txtPass.Text & ";" _& "OPTION=" & 1 + 2 + 8 + 32 + 2048 + 16384 Conn.CursorLocation = adUseClientConn.OpenDebug.Print Conn.State End Sub
That all works great now when I call the Sub from my main form. Connection state shows a 1. Here is the problem. Right after I call this sub from the main form, I have an If Else statement checking to see if the connection is good.
VB Code:
Call UserConnectIf Conn.State = 1 Then Unload frmInfo Form1.Caption = "You are logged " Set rs = New ADODB.Recordset Etc, Etc, Etc.
On debugging, as soon as the Call to UserConnect is done I get this error on the If Conn.State =1 Then line.
RunTime Error 91
Object Variable or With block variable not set.
As usual, I am sure I am missing something simple.
Thanks again
Access 2000 Front End With Access 97 Back End
Hello,
I was wondering if anyone knows or has experience with this scenario:
I have an Access applic written in Access 2000. This is the front End. The Front End is connected to the Access 97 Back End. Does anyone know if there is a significant differene in performance with respect to this scenario instead of using an Access 2000 Back End? I can not test this at the moment.
Thanx.
Johan
MS ACCESS With VB Front End
hi,
I'm a VB virign and I have produced a database in access 97 and I need a fancy front end for it and I just haven't got a clue where to start.
MS Access With VB Front End
Hello Everybody,
In the past I have used msaccess databases for online applications, using ASP/SQL to connect to the database and manipulating the data accordingly. Through using ASP, I guess I know some VBScript.
Now I would like to create a database which will be used offline. Basically, I want to create a database in access for a business I am setting up. It will handle accounts, point of sale etc. I hate 'standard' accounts applications and would rather build something myself which works for me. I'm ok with access, and could probably get the database working in a few months.
However, I would prefer to have a different front end. Basically, in my experience users of applications tend to mess things up wherever possible. Producing a front end in VB will, I believe, mitigate such problems.
The question I therefore have is firstly - is the best way to do this with VB. Secondly, can anybody advise me where to start, or give me a quick example of a little application?
If anybody can help, I would greatly appreciate it
Andy
VB 6.0 With Access As Front End
I have a problem. First of all I am not a strong VB coder. So here is my problem. I have a form that is in Access. I am trying to write the code to check the condition if "check" is selected form a combo box and the user has left the "check num" field blank. I want a message box to prompt the user to enter a check number. A copy of the code i have is attached. Please look at the code and see what I'm doing wrong.
The combox box name is cboPaymentMethod, the check No. field is named CheckNum.
Code:
Private Sub PrintRec_Click()
On Error GoTo Err_PrintRec_Click
Dim rstTrans As New ADODB.Recordset
Dim fld As ADODB.Field
Dim strField As String
Dim curCount As Currency
Dim PaymentMethod As String
rstTrans.Open "dbo_tbl_Transactions", CurrentProject.Connection, adOpenKeyset, adLockOptimistic
If IsNull(Me.TempTransNumID.value) Then
'this is new record
rstTrans.AddNew
Else
'to stay on the record that was just inserted for editing
rstTrans.Find ("TransNumID=" + Str$(Me.TempTransNumID))
End If
rstTrans!TransDate = Me.TransDate
rstTrans!CustomerName = Me.CustomerName
rstTrans!VehType = Me.VehType
rstTrans!TktType = Me.TktType
rstTrans!Auth_By = Me.AuthBy
rstTrans!Quantity = Me.Quantity
rstTrans!SHtkt1 = Me.SHtkt1
rstTrans!SHtkt2 = Me.SHtkt2
rstTrans!HRtkt1 = Me.HRtkt1
rstTrans!HRtkt2 = Me.HRtkt2
rstTrans!TransPayAmt = Me.TransPayAmt
rstTrans!PaymentType = Me.txtPaymentType
rstTrans!PaymentMethod = Me.cboPaymentMethod
rstTrans!CheckNum = Me.CheckNum
rstTrans!TransReceiptMemo = Me.TransReceiptMemo
rstTrans!TransEntryTime = Now()
rstTrans!TransEntryUserID = appUser
//////here is the code that is in question
If Me.cboPaymentMethod = "Check" & CheckNum.Text = "" Then 'Check number not entered
MsgBox "You must enter a check no."
CheckNum.SetFocus
End If
rstTrans.Update
'this was a new record so update the form value of TransNumID for edit
If IsNull(rstTrans!TransNumID.value) <> True Then
Me.TempTransNumID = rstTrans!TransNumID.value
End If
whereClause = "NewQryShuttleHandiRideReceipt.TransNumID" & " = " & rstTrans!TransNumID
'DoCmd.OpenReport "RptShuttle HandiRide Receipt", acViewNormal, , whereClause
rstTrans.Close
Set rstTrans = Nothing
Me.cmdAddRec.Enabled = True
Exit_PrintRec_Click:
MsgBox "Record Successfully Saved! Printing Receipt."
Exit Sub
Err_PrintRec_Click:
MsgBox Err.Description
Resume Exit_PrintRec_Click
End Sub
Access Front End
Hello,
background : new to vb and trying to create a front end to an existing Access database on my local drive.
I am using Access 2000 and VB 6.0
question : Any clues to what I could be doing wrong?
Thanks,
bruce
VB As Front End For Access
I was wondering if I could use VB 6.0 as the front end of a database created in access. The Reason, I want to let users enter information into my Access 2000 DB without actually opening access. Therefor I thought I could use a VB form to have users insert this information. Is this possible? Please help I am new to all of this. Thanks
VB Front End On An Access 97 DB --- With Code
Im not really sure how to put my problem... as im really a beginner at VB.
IF got VB 6 pro and im trying to make a program that will serve my work. I work in a video library and i want to create this project to do the following Functions [ some of which i have allready acomplished]. My data base has 2 tables in it
--Members
&
--Videos
Here are the required functions:
- Add Member [sorted]
- Delete Member [Sorted]
- Find Member [Partialy sorted, data has to be exact in order to find the record]
- Refresh the Members DB [sorted]
As above for the Videos Table. Add, Delete, Partial Find and Refresh.
What i need help with is the next stage.
In both tables i have my primary Key feilds...
Member ID & Video ID...which are both set to auto number, which seems to me to be the most logical explination.
In the current system [which i am trying to emulate] inorder to book a video out you must ender a Members ID or Membership Number and then enter the video ID or stock code. This will show that
Joe Bloggs Has The Film Friday 13th...
Basicaly when i try to look for the Member ID or the Video ID i get the following Runtime Error
Run-Time Error '3077'
Syntax error (missing operator) in expression...
The bit of text ti regards are the 2 embolded below... Email me if you can help any further!!!!!
Private Sub cmd_refresh_Click()
datvideos_database.Refresh
End Sub
Private Sub cmd_video_Click()
intResult = MsgBox("Are you sure you want to Delete This Video??", vbYesNo + vbQuestion, "Video Deletion warning")
If intResult = vbYes Then
Datvideo_database.Recordset.Delete
Datvideo_database.Recordset.MoveNext
End If
End Sub
Private Sub cmdadd_member_Click()
If Datmembers_database.ReadOnly Then
MsgBox "This Database Is Locked So you Are unable To Add Any New Records", vbExclamation, "Data Addition Warning"
Else
Datmembers_database.Recordset.AddNew
End If
End Sub
Private Sub cmdadd_video_Click()
If datvideos_database.ReadOnly Then
MsgBox "This Database Is Locked So you Are unable To Add Any New Records", vbExclamation, "Data Addition Warning"
Else
datvideos_database.Recordset.AddNew
End If
End Sub
Private Sub cmddelete_member_Click()
intResult = MsgBox("Are you sure you want to Delete This Member??", vbYesNo + vbQuestion, "Member Deletion warning")
If intResult = vbYes Then
Datmembers_database.Recordset.Delete
Datmembers_database.Recordset.MoveNext
End If
End Sub
Private Sub cmdfind_next_Click()
datvideos_database.Recordset.FindNext "Forename = '" & txtsearch_member.Text & "'"
End Sub
Private Sub cmdfind_previous_Click()
datvideos_database.Recordset.FindPrevious "Forename = '" & txtsearch_member.Text & "'"
End Sub
Private Sub cmdfind_video_Click()
datvideos_database.Recordset.FindFirst "Forename = '" & txtsearch_member.Text & "'"
End Sub
Private Sub cmdget_member_details_Click()
datrental1_database.Recordset.FindFirst "Member ID = '" & txtmember_ID.Text & "'"
End Sub
Private Sub cmdget_video_details_Click()
datrental2_database.Recordset.FindFirst "Video ID = '" & txtvideo_ID.Text & "'"
End Sub
Private Sub cmdrefresh_Click()
Datmembers_database.Refresh
End Sub
Private Sub cmdsearch_Click()
Datmembers_database.Recordset.FindFirst "Forename = '" & txtsearch_member.Text & "'"
End Sub
Private Sub cmdsearch_next_Click()
Datmembers_database.Recordset.FindNext "Forename = '" & txtsearch_member.Text & "'"
End Sub
Private Sub cmdsearch_previous_Click()
Datmembers_database.Recordset.FindPrevious "Forename = '" & txtsearch_member.Text & "'"
End Sub
Any Help to make this work will be GREAT as i am so close to making it work and this is so annoying!!!!!
Please dont laff at me if my code is crap!
How To Convert Access Front End To VB App.
We have a pretty extensive Access front end to the company Sql Server back end database. This includes a myriad of reports and forms. For a variety of reasons, we would like to convert this from Access to a Visual Basic application.
Can anyone offer a suggestion or two on the most most efficient way to do this?
Thank you in advance for any help you can offer.
VB Front End/Access DB Distribution
Hi
I've got a front-end written in VB6 using ADO that searches an Access DB. I want to distribute this on a CD so that the user can just pop in the CD and run the EXE and it doesn't need to install any files, like DLLs, to do it. Does anyone have any ideas?
Many thanks,
Duncan
Running Access Reports From VB6 Front End
I have developed a VB6 front end pulling off an access database. I have some reports based on queries that I would like to run from VB. What is the best way for me to do this?
Thanks
Access Front-end - Back-end With ADO Connection!
I have an Access 2000 database named orderentry.mdb split into also orderentry_be.mdb. I know that if I have multiple clients that want to use a single Access database I need to setup front-ends with each computer linked and connected to the back-end.
In the past, I originally made a Visual Basic program that connected directly to the back-end with ADO. It was fast and worked well!
Now in the present, I tried to make my VB program connect to the front-end with ADO. It now works 3 times as slow! Did I have the connection right in the first place? Should I have everyone connect to the back-end like before or will it make it slower?
Any help is appreciated = THANKS A BUNCH!
Sincerely
Stephen
Access Front End Using Drag And Drop???
Hi I am fairly new to visual basic and i need some help to create a visual basic front end to my access database. I can view the data and scroll through records etc but i need to add data by dragging and dropping icons onto a picture. Has anyone seen anything like this or has anyone got any ideas? thanks for your help.
jeremy.
VB6 Front End With Access 2000 Database
Help!!!
Can Someone please suggest to me why I keep getting run-time error 3426. I have researched it and tried every suggestion I have found!!!! Help!! The answer is probably right in front of me and but I am suffering from "VB hypnosis." Any suggestions are appreciated!!!
Here is my code: I have highlighted the lines that are causing my error!
Code:
Dim intUserResponse As Integer
Dim SearchStr1 As String
Private Sub cmbAccessFee_KeyPress(KeyAscii As Integer)
KeyAscii = 0
End Sub
Private Sub cmbEmployeeID_KeyPress(KeyAscii As Integer)
KeyAscii = 0
End Sub
Private Sub cmdAdd_Click()
cmbEmployeeID.Enabled = True
cmbDealerCode.Enabled = True
cmbPeriod.Enabled = True
cmbYear.Enabled = True
cmbTerms.Enabled = True
txtDate.Enabled = True
txtCustomerFirstName.Enabled = True
txtLastName.Enabled = True
txtWirelessNumber.Enabled = True
txtEsn.Enabled = True
chkUpgrade.Enabled = True
txtRateCode.Enabled = True
cmbAccessFee.Enabled = True
cmbLocation.Enabled = True
cmdEdit.Enabled = False
cmdFind.Enabled = False
cmdUpdate.Enabled = False
cmdSave.Enabled = True
cmbEmployeeID.SetFocus
[color=crimson]frmMain.DatCommission.Recordset.AddNew[/color]
End Sub
Private Sub cmdEdit_Click()
cmbEmployeeID.Enabled = True
cmbDealerCode.Enabled = True
cmbPeriod.Enabled = True
cmbYear.Enabled = True
cmbTerms.Enabled = True
txtDate.Enabled = True
txtCustomerFirstName.Enabled = True
txtLastName.Enabled = True
txtWirelessNumber.Enabled = True
chkUpgrade.Enabled = True
chkCancellation.Enabled = True
txtCancellationDate.Enabled = True
txtNotes.Enabled = True
txtRateCode.Enabled = True
txtEsn.Enabled = True
cmbAccessFee.Enabled = True
cmbLocation.Enabled = True
cmdEdit.Enabled = False
cmdSave.Enabled = False
cmdUpdate.Enabled = True
cmdFind.Enabled = False
[color=crimson]frmMain.DatCommission.Recordset.Edit[/color]
[color=crimson]frmMain.DatCommission.Recordset.Update[/color]
End Sub
Private Sub cmdEnd_Click()
frmMain.Hide
frmSignin.Show
cmbEmployeeID.Enabled = False
cmbDealerCode.Enabled = False
cmbPeriod.Enabled = False
cmbYear.Enabled = False
cmbTerms.Enabled = False
txtDate.Enabled = False
txtCustomerFirstName.Enabled = False
txtLastName.Enabled = False
txtWirelessNumber.Enabled = False
txtEsn.Enabled = False
chkUpgrade.Enabled = False
chkCancellation.Enabled = False
txtCancellationDate.Enabled = False
txtNotes.Enabled = False
txtRateCode.Enabled = False
cmbAccessFee.Enabled = False
cmbLocation.Enabled = False
End Sub
Private Sub cmdFind_Click()
frmMain.Show
frmSignin.Hide
SearchStr1 = InputBox("Please Enter Customer Wireless Number", "Customer Wireless Number")
frmMain.DatCommission.Recordset.Index = "Customer_Cell_Number"
frmMain.DatCommission.Recordset.Seek "=", SearchStr1
If frmMain.DatCommission.Recordset.NoMatch Then
frmMain.DatCommission.Recordset.MoveFirst
cmdEdit.Enabled = False
Else
cmdEdit.Enabled = True
End If
[color=crimson]frmMain.DatCommission.Recordset.Edit[/color]
End Sub
Private Sub cmdSave_Click()
If cmbAccessFee.Text = "" Then
intUserResponse = MsgBox("You Must Fill In All Fields!", [vbOKOnly], "Information Required")
cmbAccessFee.SetFocus
Else
[color=crimson]frmMain.DatCommission.Recordset.Update[/color]
cmbEmployeeID.Enabled = False
cmbDealerCode.Enabled = False
cmbPeriod.Enabled = False
cmbYear.Enabled = False
cmbTerms.Enabled = False
txtDate.Enabled = False
txtCustomerFirstName.Enabled = False
txtLastName.Enabled = False
txtWirelessNumber.Enabled = False
txtEsn.Enabled = False
chkUpgrade.Enabled = False
chkCancellation.Enabled = False
txtCancellationDate.Enabled = False
txtNotes.Enabled = False
txtRateCode.Enabled = False
cmbAccessFee.Enabled = False
cmbLocation.Enabled = False
cmdEdit.Enabled = True
cmdFind.Enabled = True
cmdUpdate.Enabled = False
End If
End Sub
Private Sub cmdUpdate_Click()
[color=crimson]frmMain.DatCommission.Recordset.Edit[/color]
[color=crimson]frmMain.DatCommission.Recordset.Update[/color]
cmbEmployeeID.Enabled = False
cmbDealerCode.Enabled = False
cmbPeriod.Enabled = False
cmbYear.Enabled = False
cmbTerms.Enabled = False
txtDate.Enabled = False
txtCustomerFirstName.Enabled = False
txtLastName.Enabled = False
txtWirelessNumber.Enabled = False
txtEsn.Enabled = False
chkUpgrade.Enabled = False
chkCancellation.Enabled = False
txtCancellationDate.Enabled = False
txtNotes.Enabled = False
txtRateCode.Enabled = False
cmbAccessFee.Enabled = False
cmbLocation.Enabled = False
cmdEdit.Enabled = True
cmdFind.Enabled = True
cmdUpdate.Enabled = False
End Sub
Thanks
Giacomo!!
Searching An Access Database With VB Front
Hi,
I have written a VB script that handles a Database,
The database comprises of member details for a club,
I have a form that will add, edit, remove etc and will also cycle through details (the database does not appear as a list)
However I want to be able to "search" for members, and have their details appear on the form.
How can I do this? I am using VB6 and Access 2000
Relational Access Database, Vb Front End
hi,
Do relational databases work in visual basic, i have an access database as a backend which has about for relationships in, but these dont seem to work in vb
e.g manu id is linked to manu id on another form which also has manu name is it possible to have the manu name on a vb form with out having more then one dataset ?
Converting MS Access Front-Ends Into VB
Dear All
Does anyone know of a nifty add-on/application that will convert an MS
Access 2000 front-end (ie, forms, etc) into VB?
Any guidance deeply appreciated!
Hopingly! Tracie
Password In Ms Access Front End App To Sql Gets Erased
I have a ms access application 2003 that is the front end to a sql database 2000. The database is in a remote location. Well each time the programmer sends me a new copy with changes I have to use the get external data and re link the tables using odbc because the password gets erased. Is there an easier way to save or hard code the password by using a host script or something to that effect so I can just copy and paste the updated access app to update it rather then going thru the relink process.
Overview Of VB Front-End To Access Database
This is a general overview kind of question. I'm really not looking for too many details, just guidance as to a general approach.
When you create an application front-end within Access, you usually set a form's "record source" property to a recordset (either a table or a query). You can then bind each control (textboxes, etc.) to individual fields in the form's underlying table (actually, recordset). Then, you can use either Access commands to update information or use SQL queries to accomplish the same task with caution that the binding within the access controls doesn't duplicate your SQL Update queries.
When you build a front-end with Visual Basic to an Access back-end, there is no record source property for a form. So would you
I. Create one form that uses a bunch of controls (like textboxes for simple illustration) to gather information, put this together into an SQL query and use the data from the textboxes to update the database.
Create a second form that uses a bunch of textboxes (for simplicity) to show information and pop display information into these controls (using a second form)
II. Could you combine the two forms in the first example above so that one form can be used for editing a table (recordset) or adding a new record with the same controls
III. Would you somehow use data controls so that each field in the table (recordset) can be updated individually or a new record added as desired (Bind each control to individuals fields of a recordset in a data control, itself bound to a database).
There is probably many ways to accomplish the same task, but I'm wondering what is the most common / most efficient way to do it. Please don't feel limited by my suggestions. If there is a more common (or better) way to do this, please feel free to go in that direction. I appreciate the help !!!
Entering New Records In Access Tbl Always Come To Front Of Table?
I'm trying to manually insert a couple of records in a table that already contains a lot of records. I just add them to the end of the table, but when I open the table again, the records have been moved to the top of the table.
Why is it moving the records? I want them to be at the end. It makes a difference to my app.
NEWBIE QUESTION: Putting A VB Front End On Access?
I have a developed Access 2000 database populated with test data.... and need to know the best source to learn how to tie a VB front end onto it. Went to MSDN and ok.... I'm LOST.. ....
Familiar with VB.... but not the integration of Access into it.... can someone point me in the right direction, web sites, good reference books. Any help would be appreciated....
Updating MS Access Table Structure Using A VB Front End.
Don't know if this question belongs here, but having had a look around thought maybe this forum is the closest.
Going to deploy new desk top VB app with MS access backend to approx 40 users. In the future might need to change the table structure by adding new columns. Is this possible remotely without having to deploy new Db etc. A few ways I can think of but don't know if they would work:-
1. Mail out sql scripts to all users with instructions on how to back the data up and run the scipts.
2. build small VB app that has some sql code that does the job.
3. Instruct users to navigate to secure web site and ask users to download scripts and instructions.
What do you think? anyone know the most efficient way of doing this? does the above ideas sound ok or way of the mark?
VB Front Access Back End. Connectivity Prob
Right now I am only adding to a table tblAddasset and nothing else. Maby someone can help me out with what I am missing.
In my declarations I have
Dim conn as New ADODB.Connection
Dim rs as New ADODB.Recordset
Dim Cmd as New ADODB.Command
Then in form load I make a connection as follows
Conn.ConnectionString = "provider=Miocrosoft.Jet.OLEDB.4.0;" &_
"Datasource="cproigramfilesDB.mdb"
conn.open
.Then I want to use the Add Item button and use code below
'to check my connection I use
1.If conn.state = adstateopen then MsgBox "Connected"
2.cmd.commandtext = "tblAddAsset"
3.cmd.commandtype = adCmdTable
4.Set rs = cmd.execute
5.if Not rs.EOF then rs.MoveLast
6.rs.AddNew
7.rs.Fields("name").Value = txtNAme.text
enter other fields as well
8.rs.update
What happens when I run this is I get the message box telling me I am connected but then i get an error message as below
"The connection cannot be used to perform this operation. It is either closed or invalid in this context." I debug at line 4 above.
IF I Ommit this line or comment it out I then get the error
"Operation is not allowed when Object is closed" for line 5.
I dont understand because MsgBox is telling me a have an open connection
PLEASE HELP ME!!!
Query Multiple Variables In Access From VB Front End
Hello all,
I have a project that i ma workin on that will query an access database according tot he selections made on the vb front end. Currently I can only get the data to be queried by 1 variable. CAn anyone offer some help with integrating the other 6 fieds into the query?
'run query against access database
OleDbDataAdapter1.SelectCommand.Parameters("lic").Value = TextBox7.Text
OleDbDataAdapter1.Fill(SkuLocate1)
DataGrid1.AlternatingBackColor = Color.Bisque
There are 6 other variables that match fields in Access. FYI I am using Access 2002 and the Jet from VB.
Please help!!!!
Thanks,
Johnny
Edited by - johnnyvv2003 on 10/22/2003 7:00:49 AM
Can You Convert A Mircrosoft Access Front End Database Into Visual Basic?
The root problem is Access database speed over the network.
Also, may have something to do with my Access DB design (i.e
subforms, many records, etc.) vs. the network.
However, I tried splitting the database into front and back ends
in hopes for some improvement, but no dice. We do have an
application we received from another group that uses Visual
Basic 6 on the front end and an Access backend. It seems to
work pretty smooth although it is pretty simple in
design/content.
Is there an easy way to convert the front end of an Access
database into Visual Basic 6 or even VB.Net?
Strange Error
Hi,
I've got a weird error in my visual basic program. It works fine on my machine but I've tried it on someone elses and when I try to start the program it says "Application-defined or object-defined error". I've been searching around the internet and this error seems to appear a lot when access is involved but my program has nothing to do with access. The only thing I think it could be is the program gets a string from the registry at start up. But I don't understand why it would cause this error. The key does exist in the registry so that shouldn't be stopping it.
Any ideas?
Redneon
Strange I/o Error
I'm perplexed by my debugging error.
I've written some code to open a file read the first line and return the first two characters into an array. The text file being read from is created by running a batch file. However I keep getting an Input past end of file error whenever I try to read the file.This is strange because I have not opened the file prelude to this. Going through the program step-wise returns no error but going through it with f5 gives the error.
Heres the code. as you can see I've already tried a few diff approaches to this.
Private Function IcCount() As Integer
Dim aIcCount(2) As Integer
'Dim nIcCount As Integer
Dim sline As String
'Dim temp As Integer
Open sTxtPath For Binary As #3
Line Input #3, sline
aIcCount(UBound(aIcCount)) = CInt(Left(sline, 2))
' sline = Space$(LOF(3))
' Get #3, , sline
Close #3
'aIcCount(UBound(aIcCount)) = CInt(Left(sline, 2))
'IcCount = CInt(Left(sline, 2))
IcCount = aIcCount(UBound(aIcCount))
End Function
Please expound your replies as I have only been using the language two weeks and are not too with all the lingo.
Thanks for your help
Strange Error On Different PC
I've packaged a program using DevStudio 9 and sent it to my boss (who's overseas) and he gets this error that's attached. It installs and runs fine on my pc, I even installed it and ran it on a pc that does not have VB on.
What can I do to fix this problem?
Thanks
Really Strange Error
I have an ActiveX exe prject (Project1) that refrences an AvtiveX ocx (Project2), both of which I have the code for. When the UI processes a transaction, data is set into the ocx and then the ocx completes processing. This is all working fine. The refrence is early binding.
We have a 3rd Project that is also ActiveX exe (Project3) that refrences Project1 through com/ole to use the UI of Project1.
When Project3 calls Project1 the UI comes up fine and acceptes the data as it should. When Project1 tries to loads this data into the ocx (project2) I get "error 438 object does not support property or method". If I switch back to running directly in Project1 everything works just fine. There is no extra code in the properties, just data save.
I am able to get data out of the .Name property of the ocx when executing through Project3. But all Methods or Properties I made fail with the same error. So the ocx is loading at run time but my stuff is not accesable.
We have an install base of 5000+ computers and this is only happening on 5 so far. The failing machines consist of new installs and version upgrades. Also some have XPSP2 and XPSP3. I have found no common factor among these machine.
Any and all ideas are greatly appreciated.
Strange Error 9
The following code, when compiled(Make .exe) and run yields an Error 9, Subscript out of range. The app then crashes with an error message, after which Windows closes the program and files an error report somewhere. But it works perfectly in debug mode (F5). To find the cause I had to laboriously comment our sections of code until I found the guilty area.
The subject code needs to open a 62,400 byte (maximum size) binary file and place its contents in a byte array:
Code:
Open App.Path & "RD.tmp" for Binary As #1
ReDim tR(0 To LOF(1) - 1) As Byte 'This array needs to be Base 0
Get #1, , tR()
Close
I use Option Explicit and Option Base 1 and Private Declarations; in this case: Private tR() As Byte.
This code is in the tail end of form_Load but moving it to a separate Sub makes no difference.
I have had to be VERY CAREFUL with the arithmetic involved in larger byte arrays because of overflow situations. I don't think that is involved here because the tR() array is fewer than 65535 bytes.
Strange Error
i am opening an access database with this lines
Set db = OpenDatabase(App.Path & "cadastro.mdb")
Set rs = db.OpenRecordset("Select * from maquina")
but when the program reads the second line it returns error 13 type mismatch but i am not understanti why can somebody help me?
Strange Error
In vb6 with SP6 I got one strage error and Windows XP with SP1 and SP2 (on diferent systems)
6.36- 7.14=-.779999999999999
This I get and in Immediate window and in code
Or
-0.34+0.34 = 1.66533453693773E-16
This error I don't get immediate window, only in code
I try on diferent computers (Intel, AMD, Old Duron, Celeron, Athlon 64 etc)...same thing
Strange Error
Hi all and thanx for reading this thread.
I have a problem with a VB app.
It has 5 forms, 4 modules and a class module. When I run it in the IDE, all works fine, but when I run the .exe (on the same PC) an error occour:
Run-time error '5':
Invalid procedure call or argument
I can't see where the error is, because in the IDE it doesn't occour.
Does anyone know what it can be?
I can post the project, if someone has the time to see it.
Thanx in advice
Strange Error
the code is like this :
Code:
newtempstatus = (linesdone * 100) totallines
totallines is always constant, at this time 566
it always error if linesdone exceed 328
it says :
"Run time error '6' :
Overflow"
if i move the cursor on (linesdone * 100), it says "(linesdone * 100) = <Overflow>
but if i change the line into
Code:
newtempstatus = 32800 totallines
, it works *confused*
can someone help me solve this strange problem?
This Error Seems Very Strange...
There was a post somewhere about this but using older versions and no solution...
I'm using Excel xp on Win XP pro and get the following error:
Method 'Add' of object 'Validation' failed -2147417848
It fails using the following code:
Sheet1.Range("$B$2").Validation.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:=runningList
What I'm doing is reading a bunch of names (29 names) from another spreadsheet, then adding them to "runningList" : "name1, name 2, N.A.M.E-3"...
Then I use Sheet1.Range("$B$2").Validation.Delete to remove a dropdown list from a cell, afterwards updating/creating a new list using the names read in above.
This worked great for a while, until I received a new sheet with a few more names. The original file had 26 names, runningList was 234 chars long. The new file has 29 names, runningList is 273 chars... and thisone gives the error, Excel freezes and must be shutdown.
Are there limitations I'm not aware of? any way around this (i need a dynamic dropdown list).
Thanks in advance!
TOm
Strange Error
Hi,
I have this application which calls a MTS package (on the App Server) and which in turn does a huge processing (makes many database calls, manipulates the data). So the process on the Client machine is taking lot of time (6 mins, which is acceptable to the User.).
Now if the Clients navigate between other windows (say Outlook, Explorer or any other window and back and forth to this application), then once in a while I am getting this strange error (Automation Error).
“It is illegal to call out inside message filter”
We are not able to regenerate this error on a regular basis, but is happening (once in a while). Can any body have a look at this...and Please help me out.
Thank you all.
Strange Error
Every so often I get errors when accessing Excel through VB, on this line of code:
Worksheets("Sheet1").Activate
The latest error was completely bizzare:
"Runtime Error 462
The remote server machine does not exist or is unavailable"
What remote server??? I'm not using any form of networking or anything at all. My computer isn't even connected to the net, and yet the code works nine times out of ten. What's going on?
|