Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a table with a List, Date, T

Status
Not open for further replies.

hongbin81

Technical User
Jul 4, 2003
61
KR
I have a table with a List, Date, Time, Duration, and Price Field.

The list fields are composed of names such as
List Duration
D:\Commercials\tiger1.mpg
D:\Commercials\tiger2.mpg
D:\Commercials\tiger3.mpg
D:\Commercials\tiger1.mpg
D:\Commercials\tiger1.mpg
D:\Commercials\tiger1.mpg
D:\Commercials\tiger1.mpg
D:\Commercials\tiger2.mpg
D:\Commercials\tiger2.mpg

and so on.

for example I need to extract tiger1 and enter a Duration like 30.

This would automatically put a Duration of 30 where tiger1's are available.

How should I approach this?
 
I think you need an update query. Your SQL view would look something like:
UPDATE tblList
SET Duration = 30
WHERE
  • Like "*tiger1*";

    Duane
    MS Access MVP
 
Would this work?
Let TxtResp = InputBox("Enter Listings", TITLE)
Set [tblLogs]![Duration].[Value] = 30 WHERE [tblLogs]!
  • like '*" & TxtResp & "*';
 
No.
You could create a query like:
UPDATE tblList
SET Duration = 30
WHERE
  • Like "*" & [Enter Listing] & "*";
    When you run the query, the user will be prompted for a listing value.

    Duane
    MS Access MVP
 
I would create a form that has a combo box:
cboListing (unique list values)
and a text box:
txtDuration
and a command button:
cmdUpdate

The On Click event of the button:
Dim strSQL as String
strSQL = "UPDATE tblList SET Duration = " & _
Me.txtDuration & " WHERE
  • =""" & _
    Me.cboListing & """"
    DoCmd.RunSQL strSQL



    Duane
    MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top