...False
strDocName = "T_MasterLinkedTableFields" 'The table used to collect all the info from the above tables
DoCmd.RunSQL "Delete * from " & strDocName 'Empty the master table
Set dbs = CurrentDb
Set RstMasterT = dbs.OpenRecordset(strDocName, dbOpenDynaset)...
Thanks to both combo and Andrzejek. That was the issue. The " & vbCrLf" was a vestige of a line I copied into the code and then was blind to afterwards. Duh. Thanks for the eyeopener.
...table
StrDocName2 = "T_MasterLinkedTableFields" 'The table used to collect all the info from the above tables
DoCmd.RunSQL "Delete * from " & StrDocName2 'Empty the master table
Set dbs = CurrentDb
Set RstSoloT = dbs.OpenRecordset(strDocName, dbOpenDynaset)...
Lol not a good guess though. I built a simple test db. Used your exact code on a button click event, the field got updated and I never got the warning.
This is just a guess but it could be that in Duane's suggestion the textbox would logically already have a value assigned but in your original version the query is run and the user supplies the value later aka after the SQL has already executed. If that is the case the error message is being...
Just to wrap this one up. Dhookom hit the nail on the head. The main issue with the odd behavior was due to the combobox's position in the tab order but there was a complicating issue that I didn't realize until the very end. The database was one I constructed a long time ago when I was pretty...
I implemented both of dhookom's suggestion. First I simplified the code behind the cboConsumer_Click event to...
Private Sub cboConsumer_Click()
On Error GoTo cboConsumer_Click_Error
Me.txtCId = Me.cboConsumer.Column(3)
Me.txtplna = Me.cboConsumer.Column(4)
Me.txtApt =...
Just to clarify are you saying that after you close the message you can't move the focus to any of the controls on the form? As if they were all disabled/locked? Also what Control and Event is the code running behind?
Good question. That would certainly make the code more concise. Thanks for the suggestion. I have no idea what I was thinking when when I did it like I did. It was at least a long time ago and no one complained until now, Lol. I'll definitely give it a try when I get back to this next week...
So from the video I'm taking it that the subform combo is only displaying one breed instead of the full list of breeds that you expect to be displayed? Is the BreedId combo bound to any data field?
...the means of selecting an entry from the combobox (mouse click or Enter key) would trigger a new record being created (or not) but somehow it is.
**************************************
Private Sub cboConsumer_Click()
On Error GoTo cboConsumer_Click_Error
Dim dbs As DAO.Database...
Recently I created some code that used DAO to read table/field information contained in a table I'd constructed for that purpose in order to append a number of new fields to their respective tables elsewhere in the database.
For example the source table for the table/field information works...
Sorry about the slow response time. I was out of the office a couple of days and when I returned staff informed me that the report had suddenly began to run normally. We'd upgraded about 10 days before and the report hung on every attempt to run it in 2010 for about a week and then started...
Hi Duane
This is the only report I've had a problem with since the change. It does have a sub report and is run via code from a form. The only code on the report itself is on the On Close event (makes an entry form visible). The other report/subreport reports run fine. The report can have...
I have a report that runs perfectly in Access 2003 but when I attempt to run the report in Access 2010 it hangs displaying a "Formatting Page" message.
I've checked the libraries references etc. and they are correct.
Any ideas what might be causing this?
I'm having a problem getting the syntax right using the Right function with a variable in a DAO recordset using the FindFirst function.
Here's the relevant lines of code. The field [Sn_Scan] is text
Dim intSnGuessLen As Integer
(1st Version)
rst.FindFirst "Right([Sn_Scan],6) ='" &...
Hi Aceman1,
Well, this is strangely fortuitous turn of events. To answer your question Customers and Accounts are two separate tables with the "Customers_Id" as the linking field.
But it's pretty much irrelevant since the drop down is now working perfectly.
Let me explain. Between my two...
Here's the story. If you want this to work you should have the requery performed in the On Change event of the Master_Customer form's Tab Control. e.g.
If Me!TabCtl0 = [The number of the tab index of the tab containing the Accounts form] Then Me.Accounts.Requery
Just be careful that you...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.