Fae, changing data on any table other than the one attached to the form is best accomplished using recordsets. Open a recordset pointing to the table attached to the subform. Update the related record through the recordset. This is vastly more efficient and easier to accomplish than bouncing...
Perhaps this will help. Instead of using Autonumber to create unique record numbers, I use the following function:
RecordID = Format(Now,"yymmddhhmmss")
You can use this function in the form's BeforeUpdate procedure to record the date and time of any changes. You can use the...
Ketan, there are others far more proficient than I am in accessing data on a remote site. If you don't get a response to your current request, trying posting again with the header, "Accessing remote database."
mac
Greg, select SQL view and place Terry's code there just as he typed it. Then look at design view and you can learn how to use the design view to produce complex SQL statements.
mac
If you have a field to accept the resultant, yes, you should use an update query. I misunderstood you from the beginning. After you select update query, there will be an update to line for each field. Place your original formula:
[Products].[Quantity]-[WeeklySales].[Quantity]
on the line that...
I believe the answer to your first question is to create an SQL statement and save it by giving it a name (stored procedure).
Select Append Query for your second problem. You will be asked if the receiving table is in the current or another database. When you select another database, you will...
How large are you trying to make the field size? What type of field are you changing. A text field can only hold so much data, 255 I believe in Access97. You may need a memo if you are attempting to expand a text field beyond its capacity.
mac
Somewhere back when, I read that once a table is created with data sharing disabled, it will remain that way, even if, data sharing is set to true later. Future tables created will share data; however, the orginal tables will remain as set upon creation.
mac
Try this:
Qty:[Products].[Quantity]-[WeeklySales].[Quantity]
Also be sure that your SQL has both tables joined with the appropriate field.
If you get a request for anything, it means that you have mispelled one of the fields. Are you sure that the field is named Quantity in both tables?
mac
Place your code in the SQL where you would normally place the field name. Access will add "Exp1:" in front of it. "Exp1" will show up as a field on the form's "List Fields."
mac
In the form's properties, set the "Allow Additions" to No. Then create a button which sets "DataEntry" to True when you want to add a new record. This is the easiest way to handle this situation without writing code to manage the recordset.
mac
First, to increment the counter. Since you store the counter(WorkOrder#) as a numeric field, your can add one to [WrkOrdr#] = Max([WrkOrdr#]).
Use error trapping to tell you when the date changes months:
[WrkOrdrDate] + 1 will add a day to the WrkOrdrDate field. This will work well until...
Gus, not only must you always dim(inision) the recordset, it must be dim'd where it will have scope within the subroutine in which you access it. A safe way to make sure that the recordset is available to each subroutine is to dim it under the Option Explicit. If you dim it in a Private...
dim x as string, y as string, z as string, xx as string
x = [Name]
y = [Address]
z = [PhoneNumber]
xx = x & vbTab & y & vbTab & z
Clipboard.SetText xx
Goto receiving record and:
Press Ctrl-V or select Paste from the menu.
SetText copies text onto the Clipboard, replacing whatever text was...
Ski,
You can use the ListCount property with the ListRows property to specify how many rows you want to display in the list box portion of a combo box.
The following example uses the ListCount property to find the number of rows in the list box portion of the CustomerList combo box on a...
Gus, another option is use error trapping; i.e.,
On Error Goto ErrHandler
SubRoutine Code
ExitHere:
Exit Sub
ErrHandler:
If Err.Number = 2105 then
'End of File
Resume ExitHere
Endif
'Something else happened
Msgbox Err.Number & vbCrLf & Err.Description
Resume...
Do you have a one to many relationship between the parent and child (subform) on the report? It sounds like you may have a one to one which would print one subform record for each record you have in the parent (Report).
mac
My first thought is to look for the insideous, hard to see page break symbol on your subform. It can be hidden up against a border. I had the same problem which nearly drove me nuts until I found that rascal. It is a little squiggly line.
mac
Terry, I wasn't aware of the linking capability of Excel to Access. It's a great solution. I have a client who is proficient in Excel. I've been exporting the data and leaving her to do the work in Excel. You gave me a solution I wasn't aware of.
Thanks. Have a kudo.
mac
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.