i'm not very good at vb and i'm sure this is an easy problem but i can't find the answer.
i have constructed a vb code to show images from a stored table [not OLE linked]:
Private Sub Form_Current()
If Not IsNull(Me.combined_image_path) Then
Me.cempic.Picture = Me.combined_image_path
End If
End Sub
this works fine except when there is no image to show, the last image stays visable. what i want is no image to show if no image is availiabe for that record.
i know that the statement should be constructed along the lines of
'then'
if no image exists then show nothing
'else'
Me.cempic.Picture = Me.combined_image_path
Private Sub NextApplication_Click() On Error GoTo Err_NextApplication_Click DoCmd.GoToRecord , , acNext
Exit_NextApplication_Click: Exit Sub
Err_NextApplication_Click: If Err.Number = 2105 Then MsgBox "Cannot navigate to the next record. This is the last record." Else MsgBox Err.Description End If
Resume Exit_NextApplication_Click
End Sub
but even when this error occurs nothing is being properly handled the way i specified - any ideas ?
I am designing a table that will be used on a Form...thee will be a series of yes/no questions. I wanted to include a list box that the user adds one or the other. However i can't remember how to do it :D :confused:
Okay, now I'm suspecting there's more to this than an overly complicated control source statement....
My summary report contains multiple objects that calculate totals based on a statement in their control source. The report ran fine for a few weeks but all of a sudden it started producing this error:
"The expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables."
I thought perhaps that 12 lengthy control source statements were simply too much for Access to handle, but then I did some testing and eventually removed all but this control source statement: =Sum([NotifType]=9)
That's about as simple as it gets, but when I try and run the report I still get the error. Ggggrrrrrrrrr....
Can anyone tell me what causes this annoying error and how I can get rid of it? (I already compiled.) What little Access quirk am I running into? I will gladly zip the file and post if necessary.
I got this to work easily on another form but on this particular form it doesnt work. I enter a command button and name it d1, then I enter this code for it to populate the current date in the field next to the box:
Private Sub d1_Click() Date_Entered.Value = Date End Sub
Can anyone see why it doesnt work :eek:
ERROR IS: Run-time error '2465':
Database cant find the field 'Date' referred to in your expression.
When I enter a date field it enders whats in that field (blank) into the field I told it (Date_Entered) on my form.
I am making a simple tabular form to use as a subform in another.
The form has a cbo box (cboItem_Name) Quantity (txtQuantity) Price (txtItem_Cost) Extended Price (txtExtended_Price)
Selecting an item in the combo puts the price in txtItem_Cost. Default for Quantity is 1. Control Source for txtExtended_Price = [txtQuantity]*[txtItem_Cost] and gives me my extended price.
I have a control in the footer of the form called txtSub_Total. It's Control Source =SUM([txtExtended_Price]). This Sub Total box generates the #error.
Can anyone tell me why? Do I need to do some other magic with my txtExtended_Price control instead of a simple calculation, like I have?
quick easy question, as im a noob when it comes to coding/vb.
Within our company database we have the usual timesheet table. With the table I have create a query (called "dailytimeforkeith") that gives me the sum of time for an individual person for one day (in fact its the previous day). What I have done then is created a form (called "keithyesterdaytime") that shows this query entry (called "sumoftimespent").
Each user has a different database screen logon and forms that are present when they log in. So what I then done is on one of these forms the load up, i attached this:
Private Sub Employee_Enter()
Me.Employee = User.FirstName
If Me.Employee = "Keith" Then
Dim stdocname As String
stdocname = "keithyesterdaytime"
DoCmd.OpenForm stdocname, , , acAdd
............
then on "keithyesterdaytime" opening the following code runs ------------------------------------------------------------
Ok I am right now making a simple Vendor/Product database to create a line sheet for some sales folks. I have 3 tables: Vendors, Products, and an associate entity Vendors_Products to relate the two. I have a form currently that draws the Vendor Name (primary key) from the Vendor table and the Product Name from the associate entity. This allows me to create new vendors and select current product types from a drop down box. The problem is that the drop down box is too long and it is tiresome when 1 vendor has 10 product types.
Can anyone tell me how to resolve this? I thought it would be better to have option buttons and display all available products. Then you could just click all of the option buttons that apply to that Vendor and it would create the relationships...is this possible?
Im new to asp and access and have been having this problem for serveral weeks.
Every couple of days, all the asp pages on my site that communicate with the database start having 500 internal errors. i turned off the "Show friendly error messages" and one page gave me this specific error:
Microsoft JET Database Engine error '80004005'
Unspecified error
/admin/submitlogin.asp, line 8
I have tried a million things and have no idea why this is happening. Im not sure what other information i should post in order to see the problem. Any help would be greatly appreciated. Thank you,
Does anybody know what this error message refers to?
"Reserved Error (-1517); there is no message for this error."
It just started happening today, and I haven't even made any changes to the database. It occurs when I hit a button I have to run a macro.
the macro does the following: 1) Shows all records 2) Requery 3) ApplyFilter. The Where Condition for the filter is: Right([tblContracts].[JobNum],4)=Right([Forms]![FrmContProc].[txtFindJobNum],4)
The weird thing is that it only occurs if the Form window is taller than 1/2 of my viewable area. If the Form window is 1/2 the viewable area or shorter, it works OK. This was running fine earlier today, but about 4:00 pm (03/31/06) this started happening.
If anybody knows what this error means, or how to get rid of it (I really need to use this window in full-screen) then please let me know.
Okay, I'm kind of stumped here.I have a subform that has a button that sends a user to a "sibling" subform on another tab page, pass some information to ensure they are adding more details to the same records rather than creating two separate record.First time I programmed it, I got an error 3022 (keys cannot have duplicate values). I checked the query of the sibling subform and saw that the ID is from the one side table. I changed it so many table's foreign key is used. Second try, I got an error 3341 (there isn't a matching key in one side table).After some thinking, it also occured to me that I had set the query this way to allow addition of new record which wouldn't be possible if I had the query pulling the many side key, not the one side key.How do I get the subform to accept the ID that is being passed and create a new record using that ID?:confused:
Private Sub Consolidate_Click() Dim temp As Variant Excel.Application.Visible = True temp = Dir(CurrentProject.Path & "Inputs") Do While temp <> vbNullString
[Code] ....
From the second iteration its not picking the error.
Hi, I have looked at some of the threads here and it is clear that many of you are working on a much higher level than me and with a high degree of familiarity with the programme. I am hoping that someone here is able to give me some advice as I don't find the MS help files digestible. The task I have is to join 2 databases and produce a table from which I can run a mailmerge. I have managed to join the 2 databases and I used a customer ID as a common link. (my apologies if the terminology is incorrect) I now have all the data I require in one table. THE PROBLEMs I have multiple entries for some of my customers and would like to reduce this to single entries (which is understandable). Please tell me how to do this if you can, and keep it as simple as you can please.
I'm making a report detailing competitors final finishing positions in a competition.
The columns are (1) Place, (2) Name and (3) Points
I have the data for their names and the points they have scored, but how do I make the table enter the record number (starting at 1) in the first field???
Not sure what the issue is here but i am trying to append a Job number from a main database into two connected databases. The number is a sequential number i have created and the primary key. It is an autonumber field(obviously). The format is J0000 and the numbers start from J0001
I am using two different append queries to append them into the external databases tables. However (and here i think lies the problem) the fields i am inserting them into are text fields with the same format J0000. When i view the numbers in these tables, they are displayed as J1 or J9. The 0's are missing. Any ideas.
Hey guys, I'm just wondering how I could limit a field to using from 2 - 20 letters. If I placed the letter "a", I'd get an error saying how at least 2 letters must be there, and a maximum of 20. How would I do this?
Lastly, how can I make it so when I enter data into a form, I can click a button which adds it all into the table? When I do it normally, it's automatically transferred into the table as I type it into the form.
This is incredibly simple I know, but I am a n00b at Access. ^_^
OK, I have a strange problem... This doesn't seem to work..... It did... then I made some changes.... Can someone clue me in on what I am doing wrong? A query, simply summing some values in fields... no biggy...... BUT... The field TotalHours: ([SundayHours]+[MondayHours]+[TuesdayHours]+[WednesdayHours]+[ThursdayHours]+[FridayHours]+[SaturdayHours])
So why isn't this working? Can I use a simple VBA statement to sum these fields?
I am trying to create an IN query (ACCESS) which will firstly show the customers table (specific details) then the orders details should be in the IN query, I formulated this but it won't work:
SELECT s.CustomerID, Address, City, PostalCode FROM Customers s WHERE s.OrderID IN (SELECT s.OrderID FROM Orders p WHERE s.OrderDate = '1996') AND s.OrderID IN (SELECT s.OrderID FROM Orders p WHERE s.OrderDate = '1997');
Here is the one I did to show the customers and orders who made orders in 1996 and 97:
SELECT Customers.CustomerID AS Customers_CustomerID, Orders.CustomerID AS Orders_CustomerID, Customers.Address, Customers.City, Customers.PostalCode, Orders.OrderID, Orders.OrderDate FROM Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID WHERE (((Orders.OrderDate) Between #1/1/1996# And #12/31/1997#));
it is probably something simple I am missing here! Sorry to keep asking :(
but I can't seem to figure it out. All I get is Null values when I run the query.
I have a form with a start text box and a end text box. I use the form name sucessfully in the criteria row so I know there is no problem with the form name. I also know there is no problem with the qry name. Does anyone see anything I am doing wrong?!?!
The query I am working in is labeled [qry_old_summary_date_range]. Just wanted to clarify that is not a problem.
I have a table with dates of deadlines and another with dates of submissions. For each deadline I want to know who submitted first. I figured that all I had to do was compute the difference between the dates and the select the minimum. However, Access rejects the Min() function in the WHERE clause. How do I avoid this?
I have a table (imported from excel) that is a pricing grid for blinds. The header row at the top is widths(mm) and the header row down the left is heights(mm). The data is the price. The import process makes the widths the column names.
height 600 800 1200 ... 300 $60 $80 $100 600 $80 $100 $120 900 $120 $140 $160 . . all I want to do is to take that table and make it flattened, like this:
I can't think how to do this in a query - I could take the flat version and create a crosstab to go the other way. Any clues - I don't want to change too much about the way the imported excel file looks becasue I have no control over that (I already discard miscellaneous heading and junk before I import it)
My Brain has completely lost all of it's gray matter.
I have two tables tbl_Employers and tbl_Services that are linked via a one to many relationship. Each Employer can have Many Services. The field i am useing in the relationship is EmployerID
If I build a simple select query using these tables I will see all of the employers that have a related record in the services table. Any employer could be listed there many times as per the relationship.
What i want is a simple count of how many employers actually have recieved a service.
Why is this so difficult for me to get my head around.
this is my query in design viewhttp://img99.imageshack.us/img99/3095/querytc3.th.gif (http://img99.imageshack.us/my.php?image=querytc3.gif)i use this query when entering datai want to know how i can set it up it display all or any one/two/none of the criteria i put into the question text boxes, number surname and state, or even just number, or just state.anyone?