Strange Behavior Adding Records
Aug 31, 2005
My client wants a data entry application, but he wants the previously entered data to remain on the screen since he usually only wants to change a couple of the data fields. So, I created a form (.mdb) and add the record via vba code.
I have the autonum field turned on and have set the form parameters to:
edit = no
delete = no
additions = yes
Data Entry = yes
Now, say the next autonum should be 50. When I add a record, the autonum used is 51 and as I continue adding records, the autonum increases properly. However, when I close the form (via the X or via a close button) record number 50 is created with the exact data in the last record added.
I can filter this out with a distinct query, but I really don't want this data and so far I have been unable to stop this from happening.
Does anyone have any idea as to what is really going on here?
View Replies
ADVERTISEMENT
Apr 5, 2005
I've never seen this before.
I have a form bound to a non-updateable query. There is an unbound combo box in the form footer.
When the form contains no records, the combo box display goes blank after you make a selection. I checked the After Update event of the combo box and the value selected is still intact but it will not display it in the actual box on the form. I've tried Me.Refresh, Me.Requery, nothing works.
If the form contains records it works just fine but often times this form may not show any records when it is first open.
Check out the attached sample DB. Can anyone explain this one?
Thanks.
View 4 Replies
View Related
May 28, 2006
I have a form with a subform which contains a combobox in one of its fields. What's buggin me about this subform is that when I enter two records in it, successively, the first record seems to save without problem, but the second one will not allow me to select any item from the combobox. The combo displays the choices but when I select one, nothing happens and the field remains empty.Note: just now I discovered that the combobox "locked" property turns to TRUE for the succeeding record, thus the uneditability. I'm still trying to find out what made it so.
View 1 Replies
View Related
Jun 26, 2005
Hello,
I am trying to add a normal JPEG or JPG image to an Access 2003 form through the "Image" control.
The problem is that when I browse for images , it does not show any JPEG or JPG images, but only BMP and images of other 3-4 formats - The JPEG format doesn't exist there. When I try to add a JPEG through "all-files" it gives me an error message - "does not support this format".
There is not problem viewing JPEG images on WinWord or other programs.
Has anyone heard of such a problem and its solution?
Thank you
Gabi
View 1 Replies
View Related
Sep 9, 2005
I have a table called 'students' with the appropriate fields. There is another table named parents_prof which contains records of common professions. The tables are related through the 'ID_parents_prof' of the 'parents_prof' table to two fields on the table 'students', thus 'students.father_prof' and 'students.mother_prof'.
1st question) Is that possible? Is it possible to create a relation between the key field of one table to two different fields of another table? Is it a good practice?
I did this because I want to build a query which checks for both fields together, meaning I want Access to return a record if the appropriate profession is in either field of mother's or father's profession.
SELECT students.surname, students.name, students.father_name, students.father_prof, students.mother_name, students.mother_prof
FROM parents_prof INNER JOIN students ON (parents_prof.ID_parents_prof = students.mother_prof) OR (parents_prof.ID_parents_prof = students.father_prof)
GROUP BY students.surname, students.name, students.father_prof, students.mother_prof, parents_prof.parents_prof
HAVING (((parents_prof.parents_prof) Like "*" & [enter profession] & "*"));
Access cannot represent the above graphical, so I had to enter the
OR (parents_prof.ID_parents_prof = students.father_prof)
in the SQL formula.
2nd question) Is the above proper query, according to the rules?
View 11 Replies
View Related
Nov 28, 2013
It is a strange effect I get when switching among records.
In a form I have a TAB Control with some pages, when I open the form everything is ok:
But, when switching continuosly among records, the font becomes strange, looking like being bold.
It seems to happen only when using TAB control or, if you prefer, only on every TAB control's page except for the first one. Tried on different pc with different resolution.
View 2 Replies
View Related
Apr 5, 2005
I have a database used by about 15 users.
Occasionally a record appears which contains strange characters in it rather then regular text and numbers.
The solution is to compact and repair the database but this means taking all users off the database.
But I need to find out how these characters are getting there - does any one have any ideas?
thanks in advance.
View 10 Replies
View Related
May 30, 2006
I imported some db objects from one db to another. I worked on the db, with the imported files, to make a new db. However, while working on the db suddenly, I lost all the imported files, as they were not visible via the objects panel.
What a revolting development this was!! All that work for nothing. I reimported a Form from the other db into the one I was working on and-WOW! All the objects showed up in the Object panel as they should. I find that importing from the other db always makes the Objects visible, so the effort was not for naught.
Does anyone know why Access 2003 behaves in this ridiculous manner? It is a real pain in the a--, but can be worked around.
View 1 Replies
View Related
Mar 6, 2006
I have a form that I have added drop down combos. I want the form to open with drop-downs blank, they keep populating. Is there a setting that could do this? Thanks
View 2 Replies
View Related
Jun 9, 2006
I have a split db with the backend on a shared drive. I have two combo boxes on my form that are filled with a sql statement from two different tables - one is "manager" and one is "owner". When I open the front end on my system both combos are loaded with the correct data. Lately when I open it using one of our dedicated computers in a conference room the "managers" combo is completely empty. The "owner" one and any others are fine. I can't figure out what could be happening to make it just lose the one. Has anyone experienced this before?
Thanks,
Toni
View 1 Replies
View Related
Jul 6, 2007
I'm currently researching on how to best migrate from Access back-end to a SQL backend, and was able to find wealth of information on how well Access can play with various SQL servers, how ODBC drivers are implemented, and how JET handles queries to backend. If this helps matter, I'm considering using MySQL as a backend.
That said, there are some gaps in my research that I'm hope someone will be able to fill in for me.
1) I have couple of queries that may use Access's custom function not otherwise supported in SQL servers. If I based the query on otherwise executable query, would JET be able to pass the sub query to SQL, and get the recordset and apply the next query using custom functions without any problems?
2) In general, DAO is best when you're using JET, but ADO is best for ODBC. I'm not clear whether it's possible to use a mixture of ADO and DAO, provided I've disambiguated the library (which I already did anyway) to make even efficient use of recordset. For example, I'd use ADO to work with data from backend and once it's bought over here, switch to DAO for faster handling by JET. Is that possible *and* advisable?
3) I found lists about limitations or problems that may arise due to differences between Access and SQL, which is good to know. However, I never found any answer as whether VBA may cause problems with using SQL data. Let's say I have a form that has lot of VBA coding to handle calculations, multiple selection in listbox to be added to a junction table, dynamically changing rowsource for a combobox, whatever that is based on a query that otherwise runs fine with SQL server- will the form still work just as fine or are there going to be any surprises after migrations?
4) Somehow related, if this is supported by whatever SQL server I may use, would I be better advised to use stored procedures in place of VBA for Access forms?
Thanks for your feedback. :)
View 14 Replies
View Related
Dec 23, 2004
I'm not sure if this is the proper forum for this post. I have a database in access in which i need to mimick a trigger like behavior. As far as I know access does not support triggers. When a user updates a record I need a LastModified date field to be updated with the current date automatically.
I've seen several examples of how to accomplish this using forms, however, the users of this database do not use forms. They are editing the records by hand by opening up the table and simply typing.
Any help you can provide is greatly appreciated.
Thanks!
View 3 Replies
View Related
Aug 4, 2005
Hi all,
I use to have a field named RDI_ID, later on I decided to change the name to RDI to make things easier.
I have several macros pulling recordsets, but they stopped working, even though I have changed that field name
to RDI in the macro as well.
Curiously, they do work when I change it back to the old name, being RDI_ID. I have been looking at that field
propriety and it is named RDI. Did I miss a change somewhere?
That table has no relationship whatsoever.
Help plzz.
View 2 Replies
View Related
Aug 4, 2005
Hi all,
I use to have a field named RDI_ID, later on I decided to change the name to RDI to make things easier.
I have several macros pulling recordsets, but they stopped working, even though I have changed that field name to RDI in the macro as well.
Curiously, they do work when I change it back to the old name, being RDI_ID. I have been looking at that field propriety and it is named RDI. Did I miss a change somewhere?
That table has no relationship whatsoever.
Help plzz.
View 4 Replies
View Related
Mar 14, 2005
Not sure what to call this "phenomenon" so haven't had any luck searching for an answer.
I have a form (form1) that has a close button with code behind it. When the button is clicked, it takes a few seconds for the code to run. When form1 closes, all is well up until: There is another form (form2) that is open behind form1. When form1 closes, part of it is still visible over form2.
Hope this makes sense. Any way to solve?
View 1 Replies
View Related
Dec 29, 2005
When I open my mainform through an onClick event of a button, the form opens up with the subform on it is disabled/closed -- Just a blank white box shows in place of the subform on my mainform. Here:
http://img426.imageshack.us/img426/4672/shot29sj.th.jpg (http://img426.imageshack.us/my.php?image=shot29sj.jpg)
However, when i go through the objects window and open the mainfrom directly. I am able to enter and update data and the subform shows up and works fine. Here:
http://img420.imageshack.us/img420/5650/shot19ig.th.jpg (http://img420.imageshack.us/my.php?image=shot19ig.jpg)
This is the code attached to the onClick event on the mainMenu
Private Sub New_Project_Click()
On Error GoTo Err_New_Project_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Project Status - Full Details2"
stLinkCriteria = "[projectId]= 0"
DoCmd.OpenForm stDocName, , , stLinkCriteria
[Form_Project Status - Full Details2]![Proj ID].Enabled = False
Exit_New_Project_Click:
Exit Sub
Err_New_Project_Click:
MsgBox Err.Description
Resume Exit_New_Project_Click
End Sub
This is the record source on the mainform:
The projectInfomation table is the record source
SELECT *
FROM projectInformation;
This is the record source on the subform:
The projectStatusCommentary table is the record source
SELECT projectStatusCommentary.projStatusId, projectStatusCommentary.projectId, projectStatusCommentary.statusCommentary, projectStatusCommentary.commentaryDate
FROM projectStatusCommentary;
The link fields are:
projectInformation.projectId
projectStatusCommentary.projectId
The tables are in sybase and my application has an ODBC connection to them.
I can update any of the tables directly without issues.
I have ran the queries independently and updated tables through the query and it works fine also.
I have been pulling my hairs out on this for over 3weeks now. cos i can't seem to find what's wrong.
I am not able to attache the db cos it's very huge. But i have copied the problematic form &subform, to a new db so you may see my design, and record sources.
If you have any suggestions, ideas, or you've come across this kind of issue before, anything...please make my new Year a happy one and help :)
I would really appreciate it!
Have a happy and prosperous new year.
Yours truly,
Frustrated one
View 10 Replies
View Related
Aug 18, 2006
I have a form with a few labels that for some reason, very often will have a strange looking line above them after I am done clicking on them. I can't seem to find out why this happens. It happens on every label on this particular form.
Please take a look at the attachment for a screenshot.
I'd appreciate any advice you may have on why this happens and how to fix it.
View 5 Replies
View Related
Jan 8, 2005
I have an insert into statment that takes information out of textboxes and adds it to a different table.
Code: DoCmd.SetWarnings False If Not IsNull(Text96) Then DoCmd.RunSQL "INSERT INTO walkers (Walker, Firstname, Date, Lastname, Visits) VALUES('" & Text96 & "', '" & Firstname & "', '" & Lastname & "', '" & Date & "', " & Text98 & ");" Text96.Value = Empty Text98.Value = Empty End If
It works but when I add the Vaule of Date I get an error.
Run-time error 3134
Can anyone see any syntax errors or what im doing wrong....
Thanks
View 3 Replies
View Related
Oct 21, 2005
I have a form that is based on a query that requires the user to choose a start date and end date for the data to display. The query looks to the text boxes on the form for the criteria for the date field (between .... and .....). For some reason, when you select the same start and end date, it won't display data even if there are records for that date. Selecting a two day range will display it, but not one. Why is that and how do I get around it??? :confused:
View 3 Replies
View Related
Nov 13, 2006
Help!
I have one table that deals with project details. Then I have one table that deals with project history. Obviously each project has a bunch of unique details and several related records detailing the project history.
My goal is to be able to read details of any project along with the last history entry.
1-I have one query that gives me the last history comment. It creates a table.
2-Then I have another query that gives me the details of the project along with all the project history. It creates another table.
3-Then I have a select query that joins the first table and the second table comparing the project history comments and only showing the records that have the same comment. Therefore I get exactly what I need; The details of a project along with the last history comment.
The problem: I get the correct records selected, however 1) if the first entry in the project history table in one or several records is one word, then the query results include those records repeated a random numebr of times. 2)If the first entry in the project history table in one or several records is two words, then the query results include those records repeated a random number of times, but less times. 3) If the first entry in the project history table in one or several records is three words, then the query results include those records repeated a random number of times, but only a few times. 4) If the first entry in the project history table in one or several records is three words or more (on average), then the query results include only the record I wanted once.
What is going on?!??!?!?!
It almost looks like the query is runing once and again until a certain number of words are compared....
This is weird.
Anyone has any idea?
thanks
mafhobb
View 2 Replies
View Related
Aug 31, 2007
I've just started using 2003 and had a query give me incomplete results. One table contains 6 numbers stored as text joined to the corresponding code in the data set table. Both fields are formatted as text. When using the table as criteria I do not get all of the expected records, I had to type in("1000", "2000",...) in order to retrieve all of my data.
Any ideas on what could be happening?
I use the text setting to avoid problems importing the data set which begins life as a csv file.
View 1 Replies
View Related
Aug 14, 2007
This is driving me crazy! I have some code that has a list of items in a listview. When I right click it shows a pop-up right click menu with a macro. Then I select an item in the list that says Rename. After ensuring a single element is selected the StartLabelEdit method is called on my list view. Then I can begin editing. Normally this works fine. However, if I first double click a list item. Then I enter my double click list view event handler and from there I open a form. Later if I close that form and then try right-clicking and selecting rename. This time after StartLabelEdit is called, the BeforeLabelEdit event is never called. The whole selected line blinks momentarily and then wherever my cursor is at that moment every item between it and the originally selected item becomes selected. If I move my mouse around the selection changes to be between the originally selected item and the one my mouse is over as it moves. It's as though I had clicked the left mouse button down but didn't let go of it and then started moving the mouse around. If I left click and release again it seems to get out of this mode, but I am still not able to ever manually invoke the StartLabelEdit method after this point. If I close the form and re-open it, it works fine. (I've tried calling refresh on the list view but this had no effect.)
Here's the really weird part. If instead of double-clicking to open a form, I right click and select a menu option to call the exact samed double click event method. Everything works fine as you would expect. Then I tried another test. I made the double click method call another method to open the form. When I did this and tried the same alternate way of opening a form, it did not work and the same original error occurred again. This weird behavior is bizarre and I have no real idea how to troubleshoot it any further.
:mad:
Has anyone ever seen or heard of something like this where StartLabelEdit goes haywire? Please help me if you can.
Thanks...
-Will
View 1 Replies
View Related
Jan 8, 2005
Hi -
I have a form with a subform in a datasheet view. They are arranged in a one-to-many relationship (It is an order header and then order detail setup). I am trying to get it so if a user updates a particular field (QTY) in the subform (which is in datasheet view), they must also update another field (SelectSize) in the same record. I have created an 'AfterUpdate' event for the QTY field. In it I have:
----------------
Private Sub QTY_AfterUpdate()
Forms![OrderForm]![OrderSubForm]![SelectSize].SetFocus
End Sub
--------------
The problem is if I already have data in the subform (e.g. 5 records), and I go to update the QTY in record #2, when the setfocus command runs, it puts me in the SelectSize field in record #5 instead of record #2. It doesn't matter what record number I try to edit, it always puts me in the SelectSize of the last existing record number. I have tried replacing "Forms![OrderForm]![OrderSubForm]![SelectSize].SetFocus" with "Me![SelectSize].SetFocus", but unsurprisingly, this does the same thing.
Does anyone know how to make the setfocus stay within the same record?
I am using Access 2003 (11.6355.6360) SP1.
Thank you,
John
View 3 Replies
View Related
Jun 9, 2006
I have a search form from which the user can search by multiple criteria.
Currently users run the search by pressing a button on the form with the mouse, the keyboard enter button just tabs around the form.
My question is can I get the enter button to run the search rather than tab around the form?
If so how?
Thanks.
Larry.
View 1 Replies
View Related
Oct 10, 2005
This is probably an age old question but after a search I could not find the answer.
I have a table with 3 fields..... last, first, ssn
I have a form with 3 text boxes. I want users to input data into those text boxes and that data inserted into the table. The code I have figured out, the problem is access tells me I cannot add to the table because the controls do not have focus. Well, I can set focus to one control at a time but then that adds three separate entrees. Am I doing this the real hard way? Im sure there is an easier way to add records to a table with multiple fields.
Thanks
View 2 Replies
View Related
Oct 28, 2005
I have am building a program that requires a staff person to enter a daily activity report on employee activity. It's initiated by adding a new record
that will allow the selection of an employees name and ID number from a drop box into respective first name, last name and ID fields. The staff person would then go on to complete the daily report by adding information in several other fields.
My form is based on a relational query built from two tables; tblClient and tbldailyreport.
Any help would be appreciated.
Regards
Timber
View 1 Replies
View Related