Wierd Subform Behavior (Please Help)

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 Replies


ADVERTISEMENT

Wierd Stuff..

Oct 25, 2005

Recently I've been having a problem with Access (2003) that I can't seem to get around. If I click on "NEW" to create a new query, do some editing, then go to close, it prompts me as to whether or not I want to save, which would be ok, if it would let me choose NO!!

I only get OK or Cancel options. I've NEVER had this problem before.
I have not done any updates added any addons. Is there some hidden trick here or some way to get around this cause its really annoying.

TIA,
Tim

View 3 Replies View Related

Wierd Opening Db Problem!

Mar 5, 2008

Hello

I have a database on a shared network drive. If you try to open the db (when another user already has the db open) from the route "my computer" then selecting the drive then selecting the db the message

"Microsoft Access can't find the database file 'M:lah blah blah'
Make sure you have entered the correct file and path name"

However, if you open the db through the access application it opens fine and there are no problems.

Has anyone come accross this before???
I have contacted our IT department who say that they cannot see why this is happening.

Thanks

View 3 Replies View Related

Wierd Date Between Query

Aug 16, 2005

I have a backwards date between query. I have a table with Date1 and Date2 fields. On the form I have a calender control. I want the user to click a date on the calender control and then look at the rows in the table to see if that date is between the Date1 and Date2 fields.

So the query will be (in english) get all rows that CalenderDate1 is between Date1 and Date2

Im stuck. Someone give me direction.

View 11 Replies View Related

Wierd Date Picker!!

Oct 12, 2006

Well this is bizzare,
I am using the microsoft date picker in my form. I have made it non editable (i.e. editable=false) when the form loads.

I am making it editable on the click of a button... Seems all so simple huh..

But my problem is that when I click the button, the date picker is displaced at the top of the form..

when I move the slide bar of the form, it again comes back to its original position..

Can anyone explain this?? and how to make it simple?

View 6 Replies View Related

Wierd Slow To Open Problem

May 22, 2007

Hi,

I have a database here that is run by users who use either Access 2002 (XP) or Access 2003.

I have noticed something which to me seems odd and dunno if any of you guys could explain why or how to resolve it?

If one of the 2002 users opens the database it opens fine first time (I use 2002 myself for development) however if a 2003 user opens it it can take 30s+ to open, but then if they close it it will re-open in just a couple of seconds like for the 2002 users.

However if a 2002 user opens it once a 2003 user has just closed it they will then take 30s or so to open it, but then again if they close and re-open it's almost instant.

Is that normal?

Incidentally office 2007 doesn't seem to suffer from this, but it's dead slow at running the database anyway so I'm not going down that route for the forseeable future!

Thanks in advance for any input!

I did try the recommended method of searching this forum using google but it didn't seem to work for me:(

View 1 Replies View Related

Wierd Sorting Situation (excluding Record)

Jun 29, 2006

I'm trying to sort a combo box alphabetically except for one value which is always at the top of the list.

The row source of the combo box is a query. record to remain at the top of the list is static- same value and ID number always. I've fiddled around with a few things, but at the end of the day, i'm just not smart enough! (or its not possible -which i doubt)..
any suggestions?
cheers.

View 2 Replies View Related

Wierd Prob: Cannot Update SQL Server Text-fields For Some Records, But Can For Others

Feb 22, 2005

Hello,

I have a very strange problem:

I have a table linked to an SQL Server table in my MS Access 2000 Application containing 5 text-fields (SQL Server Type, in Access seen as MEMO-fields) and several other fields (in total about 140 fields). Updating any field works fine except for some records. In those records I can only edit the non-text-fields in my application. When I try to edit one of the text-fields I get a error message telling me that another user has edited the record and i have to discard my changes.

The strange thing is that this problem only crops up for some records. (1 in a 100 or so) All other records work fine.

Does anyone know what happens here? And how this can be fixed?

Thanks.
Kaine

View 3 Replies View Related

Odd Behavior

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

Form Behavior

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

Combo Box Behavior

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

Access Behavior With SQL Backend

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

Trigger Like Behavior In Access

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

Weird Field Name Behavior

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

Weird Field Name Behavior

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

Form Closing Behavior

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

Strange Combo Box Behavior

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

Strange Combobox Behavior

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

Odd Behavior On Form Labels

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

Weird Addrecord Behavior *help*

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

Peculiar Date Range Behavior

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

Weird Query Select Behavior

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

Query Behavior Acess 2003

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

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 1 Replies View Related

Bizarre Behavior With Listview StartLabelEdit And Multiselecting

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

Quirky Setfocus Behavior In Afterupdate Code

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







Copyrights 2005-15 www.BigResource.com, All rights reserved